General information
Category:
ActiveX controls in VFP
>Does anyone know the syntax for looping through
>all of the child nodes of a given node.
>
>According to the help, the Child property returns
>a referenece to the FIRST child of a node object
>
>What if a node had 5 children? How would I loop
>and get a reference to each of the 5 child nodes?
Hi Kevin,
Hope this helps.
With ThisForm.tvw
*-- l_oRootNode is parent node your interested in. --*
*-- How may children for this node. --*
l_nChildren = l_oRootNode.Children
If l_nChildren > 0
*-- Index number of first children node. --*
l_nChildIndex = l_oRootNode.Child.Index
For l_n = l_nChildIndex + (l_nChildIndex+l_nChildren-1)
l_o = .Nodes(l_n)
EndFor
EndIf
EndWith
Joe
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only