Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically Expand node in Treeview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00572716
Message ID:
00572784
Vues:
26
>>Hi George,
>>
>>>ThisForm.MenuTree.Nodes(NodeKey).Expanded = .T.
>>
>>I found the EXPANDED property in the help file. The example show a numeric value for the node. Nodes(1).expanded = .T. When I said KEY I meant the KEY I gave it when I added it. i.e. ABA01
>>
>>How could I now find this numeric value based on the KEY I gave it?
>
>One more thing. If you want the programmatically expanded key to be selected, use ThisForm.MenuTree.SelectedItem = ThisFormMenuTree.Nodes(NodeKey).

George,
There is also a Selected property of the Node itself you could use.

FWIW, in my TreeView class, I have a property called lSelectOnExpandCollapse. If set to .T., when a user expands or collapses a node, the node is also selected. The same code then calls the NodeClick event to make sure any code that is associated with a user selecting a node is executed.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform