Skip to content

DoEnumerateTreeUp - AbstractTreeView

Recurses the items in the control starting with the item you pass, hItem

Type: Procedure

Parameters

Parameter Type Description
iMsg Integer A message to the object whose message ID you pass
hItem Handle The item you pass
iRecurseLevel Integer The starting level as you want to identify it

Syntax

Procedure DoEnumerateTreeUp Integer iMsg Handle hItem Integer iRecurseLevel

Call Example

Send DoEnumerateTreeUp iMsg hItem iRecurseLevel

Description

DoEnumerateTreeUp is an advanced procudure. It recurses the items in the control starting with the item you pass, hItem. The procudure will traverse all items that are children of the item you pass. It will find the first child and look for its children and its siblings and so on until all child items have been found. For each item that is found, it will send a message to the object whose message ID you pass as iMsg. This procudure differs to DoEnumerateTree, in that it searches the tree from the bottom, not the top. You would normally pass zero as the iRecurseLevel, as this represents the starting level as you want to identify it. You can pass any value you want, and it will be incremented for each level of recursion and passed on to the message you have defined. The procudure whose message ID you pass, should take two parameters: a Handle to hold the handle of the item found and an Integer to hold the recurse level of the item, which will be relative to the iRecurseLevel parameter.

This procudure is used internally, but is not defined as Private, as there may be times when it will be very useful.