Tree - FindItem Method

Executes the OnFind method on the design interface for all items

Member of Tree (PRIM_TREE)


NameTypeData TypeDescription
Result*Result (Optional)PRIM_TREE.TreeItemReference to the first design instance returning a positive result
Key*InputVariantValue to be searched for
StartItem*Input (Optional)PRIM_TREE.TreeItemReference to the item to use as the start of the Find


The FindItem method calls the OnFind method on the Prim_Tree.iTreeDesign interface implemented by the design instances.
If a True is returned by the design instance, the TreeItem 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_Tree.TreeItem) Name(#FoundItem) Reference(*Dynamic)
         #FoundItem <= #Tree.FindItem( #Key #FoundItem )
         Leave If(#FoundItem *Is *Null)
         #FoundItem.Style <= #MyStyles<Highlight>

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2