473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

right click a tree node

Is there any way to be able to right click a tree node and make sure that
the selected node is the one you right clicked? Right now I can select a
node then right click a different node and the previous node is the selected
one... any work arounds for this? thanks!
Jan 16 '08 #1
4 1535

"Smokey Grindel" <no****@nospam.comwrote in message
news:uW**************@TK2MSFTNGP02.phx.gbl...
Is there any way to be able to right click a tree node and make sure that
the selected node is the one you right clicked? Right now I can select a
node then right click a different node and the previous node is the
selected one... any work arounds for this? thanks!
On the mouse down event check if it is right mouse button. If so then do a
hittest to find the node that the mouse is over and make it selected. I had
same problem and this fixed it.

Hope this helps
Lloyd Sheen

Jan 16 '08 #2
"Smokey Grindel" <no****@nospam.comschrieb:
Is there any way to be able to right click a tree node and make sure that
the selected node is the one you right clicked? Right now I can select a
node then right click a different node and the previous node is the
selected one... any work arounds for this?
<URL:http://dotnet.mvps.org/dotnet/code/controls/#TreeViewNodeContextMenu>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 17 '08 #3
Herfried,

Völlig klar, aber wahrscheinlich besser mit einigen Englisch für diejenigen,
die nicht Deutsch verstehen,

:-)

Cor

Jan 17 '08 #4
Nicht jeder, das in dieser Gruppe ist, versteht Deutsches.... duh! ;)

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:CF**********************************@microsof t.com...
Herfried,

Völlig klar, aber wahrscheinlich besser mit einigen Englisch für
diejenigen, die nicht Deutsch verstehen,

:-)

Cor

Jan 17 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Johnson | last post by:
Been banging my head on this for two days now. Hope someone can help! My test program below is in the form of a single JSP, with a Node class build in. (All the coded needed to run is below.) ...
0
by: adbarnet | last post by:
Hi, A second question... In my treeview control, I would like to offer the user the ability to right click on a tree-node, and depending on the type of node clicked provide them either a list...
3
by: vijaynats | last post by:
I have a treeview with a ContextMenu attached. When i click on a node, AfterSelect fires but does not fire when right clicked (the context menu pops up). (Background: I have loaded a list of...
4
by: Remi Hugnon | last post by:
Hi, I want to build an expandable treeview. I saw some code on VB but I know only C# I plan for my class that each nodes has its own id (using span for example). Into a single aspx page...
1
by: Patrick | last post by:
This may be a simple question but how can I make the tree change the selected node... on a right click .. in addition to the left click? What I want is to filter my context menu based on the type...
6
by: Alan T | last post by:
Can I find out which node was right clicked on a treeview?
1
by: MrNobody | last post by:
by default when you right click a tree the control selects the node if you add a right-click event (so that I can put sepearate ContextMenus depending on what type of node the user clicked on)...
3
by: sugee | last post by:
hi, I have a treeview when rightclicked a context menu should appear. but first time wen i right click the context menu of that node(ie, add,delete) appears whereas when i right click another...
0
by: tarun | last post by:
Hello All, Please find the code for a simple wx.TreeCtrl code. Whenever I right click on any item in the Tree, I see the function, 'OnSelChanged' gets called twice. What I've just done is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.