Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically Expand node in Treeview
Message
 
 
To
24/10/2001 13:22:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00572716
Message ID:
00572781
Views:
35
>>>Hi All,
>>>
>>>Is it possible to Programatically Expand a node if I know the Node's KEY?
>>>
>>>This does nothing: THISFORM.MenuTree.expand(nNodeKey)
>>>
>>>TIA
>>>Mike
>>
>>Expand is an event that occurs when a node is expanded. It is not a method to Expand a specified node.
>>
>>Try:
>>THISFORM.MenuTree.Nodes(nNodeKey).expanded = .T.
>>
>>HTH.
>
>Larry,
>I also use expanded. However it can be used to expand too. It expects node object as parameter :
>
with THISFORM.MenuTree
> .Expand(.Nodes(nNodekey))
>endwith
>

Are you sure about this? Any code in the Expand event may fire using the correct node; however, the node itself will not be expanded.

>OTOH Expanded = .t. approach might need also :
>
>
with THISFORM.MenuTree
> .Nodes(nNodeKey).expanded = .T.
> .Nodes(nNodeKey).EnsureVisible
>endwith
Cetin

I would simply put the EnsureVisible code in the Expand event of the TreeView. At that time, you already have the reference to the Node in question.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform