Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treview - Find root node
Message
De
14/03/2009 10:16:18
 
 
À
14/03/2009 09:35:09
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:
01388042
Vues:
87
This message has been marked as the solution to the initial question of the thread.
>Dear all
>
>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.
>
>Any help is greatly appreciated.
>
>TIA
>Sergio


Node.Root returns the first root

So, I see no other possibility than navigating upwards
&& NodeClick
*** ActiveX Control Event ***
LPARAMETERS node

local RootNode
RootNode = m.Node
do while !isnull(m.RootNode.Parent)
	RootNode = m.RootNode.Parent
enddo
acti screen
?RootNode.Text
Maybe you can
- add a Property to the class (RootNode) and put that bit of code in the RootNode_Access, or
- add a function RootNode(Node)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform