Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView question
Message
From
01/09/1999 17:00:00
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00259855
Message ID:
00260362
Views:
10
>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
Map
View

Click here to load this message in the networking platform