List Cell Interface (PRIM_LIST.IListCellDesign)

Interface allowing a List to communicate with a reusable part being used as a cell

Ancestors - None


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.


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 )


Name Description
CellChanged Fire when the user makes a change to the cell content


Name Description
OnAdd Executed when an item is added
OnCellGotFocus Executed when the reusable part becomes the focus cell
OnCellLostFocus Executed when the reusable part loses focus
OnDelete Executed when an item is deleted
OnDropDownValueChanged Executed when dropdown value is changed
DropItem, Caption, Image
OnItemGotFocus Executed when the item becomes the focus item
OnItemGotReference Executed whenever a related reference is assigned to the item via the RelatedReference property
OnItemGotSelection Executed when the item becomes selected
OnItemLostFocus Executed when focus is assigned to another item
OnItemLostSelection Executed when the item loses selection
OnItemRealizing Executed whenever the design enters the on screen portion of the control
OnUpdate Executed when the associated list entry is updated

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020