Tree - FindReference Method

Find an object stored as a RelatedReference

Member of Tree (PRIM_TREE)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

PRIM_TREE.TreeItem

Reference to the first item containing the reference

RelatedReference

*Input

PRIM_OBJT

Object to search for

StartItem

*Input (Optional)

PRIM_TREE.TreeItem

Item at which to start the search

Details

The FindReference method searches for the object specified in the RelatedReference parameter in the RelatedReference property of the Tree items.

FindReference processing will stop when an item is returned or no item is found.

Example

In this example the found items are given a style to highlight them.

     Mthroutine Name(Find)
Define_Map For(*Input) Class(#Prim_objt) Name(#Object) Pass(*By_Reference)

Define_Com Class(#prim_Tree.TreeItem) Name(#FoundItem) Reference(*Dynamic)

Begin_Loop

#FoundItem <= #Tree.FindReference( #Object #FoundItem )
Leave If(#FoundItem *Is *Null)

#FoundItem.Style <= #MyStyles&ltHighlight>

End_Loop

Endroutine

See also

All Component Classes

Technical Reference

  • No labels