tree view list node event

I

iccsi

I tried to do some code when user click on node of tree view list.
I just realized that I am unable to access node on the tree view list
on the form.

I would like to know how to code onnodeclick and dblclick event.
How can I know which event exists for the node like shortcut menu.


Your help is great appreciated,
 
S

Stefan Hoffmann

hi,
I would like to know how to code onnodeclick and dblclick event.
How can I know which event exists for the node like shortcut menu.
Change you code like this:

Option Compare Database
Option Explicit

Private WithEvents m_TreeView As MSComctlLib.TreeView

Private Sub Form_Load()

Set m_TreeView = yourTreeViewCtl.Object

End Sub

Private Sub Form_Close()

Set m_TreeView = Nothing

End Sub

Now you can select m_TreeView in the object combo box above the code
editor and its events in the event combo box.

mfG
--> stefan <--
 
I

inungh

hi,


Change you code like this:

Option Compare Database
Option Explicit

Private WithEvents m_TreeView As MSComctlLib.TreeView

Private Sub Form_Load()

   Set m_TreeView = yourTreeViewCtl.Object

End Sub

Private Sub Form_Close()

   Set m_TreeView = Nothing

End Sub

Now you can select m_TreeView in the object combo box above the code
editor and its events in the event combo box.

mfG
--> stefan <--

Thanks millions,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top