I need a function that will collapse all for a given treeview
Printable View
I need a function that will collapse all for a given treeview
hi,
Try this 1..
TreeView1.SelectedItem.Expanded = False
note: this is only collapse the node which is selected..
kandan
E-mail: [email protected]
ICQ: 52774533
Yeah, I know...
I could do something like this:
But this also tries to collapse Nodes wich don't have children and it also tries to collapse nodes wich are allready collapsed...Code:
Private Function collapse_all()
Dim i As Integer
For i = 1 To tvwTree.Nodes.Count
tvwTree.Nodes(i).Expanded = False
Next
End Function
At least that's what I think...