|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
get selected node from mouse right clickhi, the treeview only selects a tree node when clicked with the left mouse
button...how can i get it to select a node with the right mouse button? thanks -- -iwdu15 In the mousedown , you can use e.x and e.y along with HitTest method to get
the nodeclicked... I don't have the exact code in the pile I have here... I found a sample from CodeProject to use.. you check the site out... Vijay Show quoteHide quote "iwdu15" <jmmgoalsteratyahoodotcom> wrote in message news:5F45722E-0C40-445B-A748-0AE9E4695CDC@microsoft.com... > hi, the treeview only selects a tree node when clicked with the left mouse > button...how can i get it to select a node with the right mouse button? > > thanks > -- > -iwdu15 Iwdu15
Was you not using version 2005 http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.nodemouseclick(VS.80).aspx Cor Here is how you do in version 1.1.. and 2003
If e.Button = MouseButtons.Right Then Dim currNode As TreeNode Dim ClickPoint As Point = New Point(e.X, e.Y) currNode = TreeViewControl1.GetNodeAt(ClickPoint) If currNode Is Nothing Then Return End If If Not TypeOf currNode.Tag Is TreeTag Then Return End If End If VJ Show quoteHide quote "iwdu15" <jmmgoalsteratyahoodotcom> wrote in message news:5F45722E-0C40-445B-A748-0AE9E4695CDC@microsoft.com... > hi, the treeview only selects a tree node when clicked with the left mouse > button...how can i get it to select a node with the right mouse button? > > thanks > -- > -iwdu15
Dynamic DataGridView missing horizontal scrollbar
Suggestions to reduce memory use when splitting a string How do you use an unbound DataAdapter? Easy One: Bind a Text Box to a an Integer Variable Dummy question Getting DataGrid row X, Y position and Changing Column Width (2003) Can't get rid of references Reflection Question and MDI question Using PLink interactively as a Telnet process with VB.Net 2003 What/How do I access installed Drivers in .NET 2.0 ? |
|||||||||||||||||||||||