Hi,
Say I have the following Treeview :
N1
|-N11
|-N12
|-N121
|-N122
N2
|-N21
|-N22
|-N221
|-N222
N3
N1, N2 and N3 are collapsed so my tree is enterely collapsed.
Now if N2 is expanded and N222 is selected, when the user clicks on a
button that should delete N222 and the tree should be refreshed and
expanded to N221, which is the previous node (if there was no previous
node, then N22 would be selected - only Nxxx nodes can be deleted).
I know how to get the level of a node :
While Not node Is Nothing
node = node.Parent
level += 1
End While
as well as its index. But N222 and N122 have the same level and index,
so how can I know to which node I should expand my tree ?
Some code would be very welcome !
Thx for your help.
Sam