treeview focuse

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

Guest

when I add new nods to the tree and it has Hscroll bar the scroll bar goes down and the focuse goes to the first node shown in the down part of the tree
how can I get the scroll bar goes up and get the focuse at the very first node of the tree
 
Hi,

Dim tn As TreeNode = TreeView1.Nodes.Item(0)

tn.EnsureVisible()

TreeView1.SelectedNode = tn



Ken

-------------

Mohammed said:
when I add new nods to the tree and it has Hscroll bar the scroll bar goes
down and the focuse goes to the first node shown in the down part of the
tree
how can I get the scroll bar goes up and get the focuse at the very first
node of the tree
 
* "=?Utf-8?B?TW9oYW1tZWQ=?= said:
when I add new nods to the tree and it has Hscroll bar the scroll bar
goes down and the focuse goes to the first node shown in the down part
of the tree

how can I get the scroll bar goes up and get the focuse at the very
first node of the tree

Call the node's 'EnsureVisible' method.
 
Back
Top