>By the way, is there any way to refer to the same value outside of
>of the click()?
>In my case, I'd like to refer to the current node's parent key value
>when I press a command button on a form.
>Any suggestion will be appreciated.
Everytime you click the TreeView, an object reference of the currently selected node is passed to the click. What you could do is subclass the treeview and add a property called ActiveNode. Then, other controls on the form could just refer to that activenode object. To start things off, in the Init() of the control, you could have code like this:
This.ActiveNode = This.Nodes(1)
Unlike other collections, the nodes collection is 1 based - not 0 based.
Then, in the click, you could have code like this:
This.ActiveNode = Node
HTH
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement