Setting focus to a treeview node

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Try setting the SelectedNode property of the TreeView or use the
EnsureVisible() method of the TreeNode.

Chris
 
Back
Top