List - FindItem Method

Executes the OnFind method on the design interface for all list items

Member of List (PRIM_LIST)


Name Type Data Type Description
Result *Result (Optional) PRIM_LIST.ListItem Reference to the first item to return a true
Key *Input Variant Value to be searched for
StartItem *Input (Optional) PRIM_LIST.ListItem Item at which to start the search


The FindItem method calls the OnFind method on the Prim_List.iListCellDesign interface implemented by the design instances.
If a True is returned by the design instance, the ListItem is returned as the Result.
FindItem processing will stop when an item is returned or no item is found.


In this example the found items are given a style to highlight them.
Mthroutine Name(Find)
Define_Map For(*Input) Class(#Prim_Alph) Name(#Key)
   Define_Com Class(#prim_List.ListItem) Name(#FoundItem) Reference(*Dynamic)
         #FoundItem <= #List.FindItem( #Key #FoundItem )
         Leave If(#FoundItem *Is *Null)
         #FoundItem.Style <= #MyStyles&ltHighlight>

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020