int AreTreeItemsRelated (int panelHandle, int controlID, int itemIndex, int relation, int relativeIndex, int *areRelated);
Returns a Boolean value indicating whether two tree items are related in a specified manner.
Returns true if the item at Item Index meets the Relation requirement with respect to the item at Relative Index.
Input | ||
Name | Type | Description |
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. |
itemIndex | integer | Zero-based index of a tree item. |
relation | integer | Defines the relationship to be tested between the two tree items. You can select the following values. VAL_ALLSpecify whether the tree items have any relationship. VAL_SIBLINGSpecify whether the tree items are siblings. VAL_CHILDSpecify whether itemIndex is a child of relativeIndex. VAL_DESCENDENTSpecify whether itemIndex is a descendent of relativeIndex. VAL_ANCESTORSpecify whether itemIndex is an ancestor of relativeIndex. |
relativeIndex | integer | Zero-based index of a tree item. |
Output | ||
Name | Type | Description |
areRelated | integer |
A Boolean value indicating whether the items are related to each other with the specified relationship. 0 = not related 1 = related |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|