TreeView Set Node to Top
-
In VB 6.0 , how to set a node to the top of the treeview? There is many node in a treeview,we could scroll the bar and select the node. However, I want to select the node by code, and show it to the user, not hiden in the scrollbar. Thanks!
-
In VB 6.0 , how to set a node to the top of the treeview? There is many node in a treeview,we could scroll the bar and select the node. However, I want to select the node by code, and show it to the user, not hiden in the scrollbar. Thanks!
If you are trying to make a node move to the top of the TreeView: Dim tmpText As String Dim tmpChecked As Boolean TreeView1.Nodes.Remove 10 TreeView1.Nodes.Add 1, , , tmpText TreeView1.Nodes(1).Checked = tmpChecked Or if you want to make sure the user can see the node: TreeView1.Nodes(9).EnsureVisible There is probably an easier way of moving nodes. Hope this code helps you.