C
Co
Hi All,
I have a treeview with some nodes.
I want to show the hierarchy of a node when I click on it.
I tried with following code but it doesn't do what I want:
Private Sub RecurseNodes(ByVal col As TreeNodeCollection)
For Each tn As TreeNode In col
MsgBox(tn.Text)
If tn.Nodes.Count > 0 Then
RecurseNodes(tn.Nodes)
End If
Next tn
End Sub
It does list all names but in the wrong order.
What I need is following:
let's say my treeview:
Kabinet
|--------Level1
| |-------- Level2
Now I want to display on a label: Kabinet\Level1\Level2 when I click
on the Level2 node.
Marco
I have a treeview with some nodes.
I want to show the hierarchy of a node when I click on it.
I tried with following code but it doesn't do what I want:
Private Sub RecurseNodes(ByVal col As TreeNodeCollection)
For Each tn As TreeNode In col
MsgBox(tn.Text)
If tn.Nodes.Count > 0 Then
RecurseNodes(tn.Nodes)
End If
Next tn
End Sub
It does list all names but in the wrong order.
What I need is following:
let's say my treeview:
Kabinet
|--------Level1
| |-------- Level2
Now I want to display on a label: Kabinet\Level1\Level2 when I click
on the Level2 node.
Marco