Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go to first node in treeview

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hello,

When I use a treeview in my application, I allways expand it. The problem I'm facing is, that the treeview allways shows the lowest part.

I would like, after the treeview has been populated, that the treeview starts at the top of the treeview (and not at the bottom)

Could someone help me with my problem?

thanks,
Björn
 
Hi,

It's a case of selecting the first node on the treeview, something like this... :

TreeView1.SelectedNode = TreeView1.Nodes(0)

Let me know how it goes!

Rob

Stay Blue, Bob. x
 
Hi Bobber,

thank you for your reply.

I tried it, but it didn't work, but...

I have found a sollution

treeview1.Nodes(0).EnsureVisible()

bye,
Björn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top