Here’s an example that has will show you how to programmatically select a TTreeView node via index number
1 2 3 4 5 6 7 8 9 |
for i:=0 to TreeView1.Items.Count - 1 do begin if TreeView1.Items[i].SelectedIndex = indexno then begin TreeView1.Select(TreeView1.Items[i]); TreeView1.SetFocus; break; end; end; |