Information générale
Catégorie:
Contrôles ActiveX en 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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement