Sure that will work, but you will screw up when you get to the end of a
branch and want to come back down the other side (if you see what I mean).
A proper traversal of a tree, in order, requires a stack (or recursion).
Your code below will traverse from the current position to the nearest leaf.
"adh" <ad*@devx.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
Thanks for the prompt reply.
My Nodes are sub nodes of Node(0) so
Nodes(0).NextNode
Did not work for me (it jumps to Node(1) not to the next sub node)
2)
NextNode does not check the end of nodes. so what I'm using is:
With stvView.trvViews
If .Nodes(0).LastNode.Index = .SelectedNode.Index Then
.SelectedNode = .Nodes(0).Nodes(0)
Else
.SelectedNode = .Nodes(0).Nodes(.SelectedNode.Index + 1)
End If
End With
????
Thanks, adh
*** Sent via Developersdex http://www.developersdex.com ***