Results 1 to 2 of 2

Thread: Please help with TreeView Nodes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Anywhere
    Posts
    136

    Unhappy Please help with TreeView Nodes

    Hey Guys, i don't why i am not getting this but i can't figure out how to know the node.key when a user 'right-clicks' on a specific tree node (i wanna appear a menu when he right clicks on this node just like when you right-click on a folder in windows explorer) ?
    So i wanna know when he clicks and when he right-clicks, get it ?

  2. #2
    wossname
    Guest
    You could use the following code...

    Code:
    Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    
    If Button = vbRightButton Then
        MsgBox TreeView1.SelectedItem.Key
    End If
    
    End Sub
    (or the Mouseup event which uses the same parameters).

    use PopupMenu() to display your menu at the mouse's current coordinates.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width