tags:

views:

134

answers:

2

If I have a TTreeView, and I call something like this:

myTreeView.Select(nodeIWantSelected);

it gets selected, but unless that node happens to be located within the part of the tree that's currently visible, I don't see it and I have to drag the scroll bar around until I find its position. How can I make the TTreeView scroll to the node when I select it?

+1  A: 

I can not test it right now but one of these might produce the desired effect:

myTreeView.Select(nodeIWantSelected);
myTreeView.Selected.MakeVisible;
// or
myTreeView.Selected.Focused := true;
Nick D
+3  A: 

Use nodeIWantSelected.MakeVisible

dwrbudr