|
-
Mar 26th, 2007, 11:35 PM
#1
[RESOLVED] [2005] Tree RightClick
Dear All,
I am trying to select a node using right click.But it is not selecting that particular
item.How to solve this problem
Dana
Please mark you thread resolved using the Thread Tools as shown
-
Mar 27th, 2007, 12:39 AM
#2
Lively Member
Re: [2005] Tree RightClick
Hi Dana, try this:
Code:
Private Sub TreeView_MouseDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles TreeView.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
Treeview.SelectedNode= TreeView.GetNodeAt(e.X, e.Y)
End If
End Sub
-
Mar 27th, 2007, 06:14 AM
#3
Registered User
Re: [2005] Tree RightClick
vb Code:
Private Sub treeview1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles treeview1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
treeview1.SelectedNode = treeview1.GetNodeAt(e.X, e.Y)
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|