Carousel Design Interface (PRIM_CARO.ICarouselDesign)

Interface allowing Carousel to communicate with its design instances

Ancestors - None

Details

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

Example

Below is a simple Carousel 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_Caro.iCarouselDesign *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 Carousel
   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" property is set') Options(*redefine)
 
      #Image.Image <= #CarouselItem.Image *As #prim_bmp
 
   Endroutine
 
End_Com

Methods

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

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2