I want the user to be able to right click select a node (then a popup menu shows)
right now I have to left click to select it then right click for the popup
Printable View
I want the user to be able to right click select a node (then a popup menu shows)
right now I have to left click to select it then right click for the popup
Use the HitTest method in the MouseDown event to see if a node exists at that location.
VB Code:
Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Dim objNode As Node If Button = vbRightButton Then Set objNode = TreeView1.HitTest(x, y) If Not objNode Is Nothing Then objNode.Selected = True 'popup your menu End If End If End Sub
Lol.. just got it and came in to delete the post
Thanks anyway Bruce! (I will leave the post for others)