Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treview - Find root node
Message
De
14/03/2009 12:56:02
 
 
À
14/03/2009 10:21:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01388033
Message ID:
01388069
Vues:
31
>If TreeView have multiple root nodes at top level wich then branch down to multiple levels.
>If user click node at the deep end, how do I find root node of that branch.
>I need actually string of that root node as they are all strings.

>
>Here is a method called GetParentNode. You call it from the NodeClick method of the TreeView, passing it the key of the node that was clicked:
>
>
>LPARAMETERS tcKey
>*** Passed the key to a given node, returns an object reference to the parent node
>LOCAL loNode, lcKey
>*** Get the parent node
>loNode = This.Nodes( tcKey ).Parent
>
>*** If we do not have a parent
>*** this is the root node
>IF VARTYPE( loNode ) # 'O'
>  RETURN This.Nodes( tcKey )
>ELSE
>  This.GetParentNode( loNode.Key )
>ENDIF
>
Thank you Marcia :)

Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform