Reputation: 21
How would I select/highlight a TreeView node in Delphi if I have its TTreeNode.AbsoluteIndex?
Upvotes: 2
Views: 3688
Reputation: 613612
The AbsoluteIndex
of a node identifies it in the tree's Items
collection. So if you know the AbsoluteIndex
you can recover the node like this:
Node := Tree.Items[AbsoluteIndex];
You can then select this node using the tree's Select(TTreeNode,TShiftState)
method:
Tree.Select(Node);
Upvotes: 2