Setting focus to a treeview node

G

Guest

Hi all,

I have a treeview that is 3 level deep with parent, children, and grand
children. How do I assign focus to a child when user does an specific task?
(In the following example Child2 needs to get focus. Treeview is expanded and
GChild6 has focus)? Thanks in advance
Parent
Child1 -->GChild1, GChild2
Child2 -->GChild3, GChild4
Child3 -->GChild5, GChild6
 
C

Christopher Kimbell

Try setting the SelectedNode property of the TreeView or use the
EnsureVisible() method of the TreeNode.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top