Treeview

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I programmatically set the focus to a specific node? The node would be
6 levels deep in the tree.
 
Arne said:
How do I programmatically set the focus to a specific node? The node would
be
6 levels deep in the tree.

Assign the node to the control's 'SelectedNode' property.
 
I'm having the same problem

The treeview doesn't have a public property selectedNode
it has a selectedNodeIndex, and it's already set to the node's index.

When you scroll down, you can see that the node is actually selected. The
problem is that the focus isn't set to that node and you have to scroll to
see it.

Is there a work around this?
 
I'm having the same problem

The treeview doesn't have a public property selectedNode
it has a selectedNodeIndex, and it's already set to the node's index.

When you scroll down, you can see that the node is actually selected. The
problem is that the focus isn't set to that node and you have to scroll to
see it.

Is there a work around this?
 
S said:
The treeview doesn't have a public property selectedNode
it has a selectedNodeIndex, and it's already set to the node's index.

The Windows Forms treeview control actually has a 'SelectedNode' property.
When you scroll down, you can see that the node is actually selected. The
problem is that the focus isn't set to that node and you have to scroll to
see it.

You may want to call the 'TreeNode' object's 'EnsureVisible' method.
 
Back
Top