tree view list node event

  • Thread starter Thread starter iccsi
  • Start date Start date
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,
 
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 <--
 
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,
 
Back
Top