tags:

views:

2677

answers:

3

Hello,

I have a system.windows.forms.treeview docked inside a panel that I am setting a node selected programically. What method or property would I use to have the treeview scroll the selected into view.

Thanks

+8  A: 
node.EnsureVisible();

for example:

if(treeView.SelectedNode != null) treeView.SelectedNode.EnsureVisible();

(see MSDN)

Marc Gravell
A: 

good, how i can get it? Can u help me?

qw
see the answer by marc
Brad
A: 

I tried this multiple times and it's not working.

Epaphrodite B. Dusingizimana