Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treview - Find root node
Message
From
14/03/2009 12:56:02
 
 
To
14/03/2009 10:21:34
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01388033
Message ID:
01388069
Views:
32
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform