TTreeNode.Index property
Ordinal position for the node in its parent node.
Declaration
property Index: Integer read GetIndex write SetIndex;Description
Index is an
Integer property which contains the ordinal
position for the class instance in its Parent node. It also indicates the
number of previous siblings (nodes on same level in the Parent node). Index
contains -1 if the node does not have an assigned Parent node.
Changing the value for the property causes the tree node to be relocated in the Parent node, or the Owner for top-level nodes. An ETreeViewError exception is raised if the Index for a top-level node is changed and Owner has not been assigned. The MoveTo method is called to relocate the tree node to the new position in the property value.
Use AbsoluteIndex to get the position for a node including all of the preceding sibling nodes and their children.
Errors
- ETreeViewError
- Raised if the Index for a top-level node is changed and Owner has not been assigned.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
