You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

List Cell Interface (PRIM_LIST.IListCellDesign)
Interface allowing a List to communicate with a reusable part being used as a cell
Ancestors - None

Details


The List Cell Interface is used when a reusable part is embedded in a list as a column.
The interface provides methods that the List can call to indicate when specific list actions have occurred.
The *ListFields parameter included in the BEGIN_COM allows field values to be mapped in and out of the reusable part. Each field used becomes a column in the underlying data list.
An instance of the reusable part is created for each entry added to the list.
Embedding reusable parts in a list provides a far more flexible approach to the presentation of data.

Example


In this example, a simple part displays an address as a single cell rather than using 4 separate columns.
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #prim_list.IListCellDesign *ListFields #ListFields) Displayposition(1) Height(68) Left(0) Tabposition(1) Top(0) Width(217) Layoutmanager(#TableLayout)
Group_By Name(#ListFields) Fields(#Address1 #Address2 #address3 #postcode)
Define_Com Class(#PRIM_TBLO) Name(#TableLayout)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout)
Define_Com Class(#PRIM_LABL) Name(#gAddress) Caption('') Displayposition(1) Ellipses(End) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Height(68) Width(217) Verticalalignment(Center) Marginleft(2) Marginright(2)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem) Alignment(TopLeft) Column(#Column1) Flow(Down) Manage(#gAddress) Parent(#TableLayout) Row(#Row1) Rowspan(3)
Mthroutine Name(OnAdd) Options(*redefine)
#gAddress := ("&1, &2, &3, &4").Substitute( #Address1 #Address2 #Address3 #PostCode.AsString )
Endroutine
End_Com

Events

Name

Description

CellChanged

Fire when the user makes a change to the cell content

Methods

Name

Description

OnAdd

Executed when an item is added ListItem

OnCellGotFocus

Executed when the reusable part becomes the focus cell ListItem

OnCellLostFocus

Executed when the reusable part loses focus ListItem

OnDelete

Executed when an item is deleted ListItem

OnDropDownValueChanged

Executed when dropdown value is changed DropItem, Caption, Image

OnItemGotFocus

Executed when the item becomes the focus item ListItem

OnItemGotReference

Executed whenever a related reference is assigned to the item via the RelatedReference property ListItem

OnItemGotSelection

Executed when the item becomes selected ListItem

OnItemLostFocus

Executed when focus is assigned to another item ListItem

OnItemLostSelection

Executed when the item loses selection ListItem

OnItemRealizing

Executed whenever the design enters the on screen portion of the control ListItem

OnUpdate

Executed when the associated list entry is updated ListItem

See also

All Component Classes
Technical Reference

  • No labels