Book Design Interface (PRIM_BOOK.IBookDesign)

Interface allowing book to communicate with its design instances

Ancestors - None

Details

The Book design interface is a specific requirement for all Book design reusable parts.
 
It provides a set of methods that can be executed by the containing Book control, allowing the reusable part to respond to changes in the Book.

Example

Below is a simple Book page that populates labels with the 3 fields that are mapped in when an entry is added via *ListFields. The values are used to populate labels on the design when the OnAdd method is executed.
 
If an image is assigned to the item, the OnItemImageChanged method is executed, and the image for the item can be used on the design.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Book.iBookDesign *ListFields #ListFields) Displayposition(1) Height(345) Left(0) Tabposition(1) Top(0) Width(356) Layoutmanager(#AttachLayout1)
 
   * Fields mapped in when the entry is added to the Book
   Group_By Name(#ListFields) Fields(#Field1 #Field2 #Field3)
 
   Define_Com Class(#PRIM_ATLM) Name(#AttachLayout1)
   Define_Com Class(#PRIM_ATLI) Name(#AttachItem1) Attachment(Top) Manage(#Title) Parent(#AttachLayout1)
   Define_Com Class(#PRIM_ATLI) Name(#AttachItem2) Attachment(Bottom) Manage(#Caption1) Parent(#AttachLayout1)
   Define_Com Class(#PRIM_ATLI) Name(#AttachItem3) Attachment(Bottom) Manage(#Caption2) Parent(#AttachLayout1)
   Define_Com Class(#PRIM_ATLI) Name(#AttachItem4) Attachment(Center) Manage(#Image) Parent(#AttachLayout1)
 
   Define_Com Class(#PRIM_IMAG) Name(#Image) Displayposition(4) Height(283) Image(#xImageImage256) Left(0) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(20) Width(354) Imagesizing(BestFit)
   Define_Com Class(#PRIM_LABL) Name(#Title) Alignment(Center) Caption('Title') Displayposition(1) Ellipses(Word) Height(20) Left(0) Parent(#COM_OWNER) Style(#xDemoStyles) Tabposition(1) Tabstop(False) Top(0) Verticalalignment(Center) Width(354)
   Define_Com Class(#PRIM_LABL) Name(#Caption1) Alignment(Center) Caption('Caption1') Displayposition(2) Ellipses(Word) Height(20) Left(0) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(303) Width(354)
   Define_Com Class(#PRIM_LABL) Name(#Caption2) Alignment(Center) Caption('Caption2') Displayposition(3) Ellipses(Word) Height(20) Left(0) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(323) Width(354)
 
   Mthroutine Name(OnAdd) Help('Executed when the item is added using ADD_ENTRY') Options(*Redefine)
 
      #Title := #Field1
      #Caption1 := #Field2
      #Caption2 := #Field3
 
   Endroutine
 
   Mthroutine Name(OnItemImageChanged) Help('Executed when the item "Image" propoerty is set') Options(*redefine)
 
      #Image.Image <= #BookItem.Image *As #prim_bmp
 
   Endroutine
 
End_Com

Methods

NameDescription
OnAddExecuted when an item is added
BookItem
OnDeleteExecuted when an item is deleted
BookItem
OnFindExecuted when the Find method is used
Result, BookItem, Key
OnItemGotFocusExecuted when the item becomes the focus item
BookItem
OnItemGotReferenceExecuted whenever a related reference is assigned to the item via the RelatedReference property
BookItem
OnItemImageChangedExecuted when the item Image property is modified
BookItem
OnItemLostFocusExecuted when focus is assigned to another item
BookItem
OnItemRealizingExecuted whenever the design enters the on screen portion of the control
BookItem
OnSortExecuted when the Sort method is invoked on the parent list
Result, BookItem, CompareTo, Key
OnUpdateExecuted when the associated list entry is updated
BookItem

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2