Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nodes in treeview
Message
De
27/12/2004 10:34:43
 
 
À
27/12/2004 10:09:23
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00972344
Message ID:
00972354
Vues:
34
Hello Héctor.

>Hi, how can I make a pass for all the nodes in a treeview no matter the deep or how many they are.

The following code is untested and off the top of my head, but it should get you pointed in the right direction. If you have a form with a TreeView on it, just add this line of code to a command button that can kick off the process:
LOCAL loParentNode
loParentNode = Thisform.oTree.Nodes( 1 )
DO WHILE VARTYPE( loParentNode ) = [O]
  Thisform.ProcessNodes( loParentNode )
  loParentNode = loParentNode.Next
ENDDO
This code in ProcessNodes()
LPARAMETERS toNode
LOCAL loChildNode
? toNode.Text
IF toNode.Children > 0
  loChildNode = toNode.Child
  DO WHILE VARTYPE( loChildNode ) = [O]
    Thisform.ProcessNodes( loChildNode )
    loChildNode = loChildNode.Next
  ENDDO
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform