GetItemLevel Function

Class

TreeView.

Action

Returns the level number of the item.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

iLevel = treeview.GetItemLevel (Item)
Variable Description
iLevel The level of the item, that is, its depth in the tree. INTEGER.
Item The item to find. STRING or INTEGER.

Notes

GetItemLevel returns the indentation level (that is, the count of ancestors between the item and the root of the tree) of an item. Items at the root are level 1, their children are level 2, and so on.

Example

Verify(MyDialog.MyTreeView.GetItemLevel(4), iExpectedLevel)