Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Give the node from contextMenuStrip to Event? (Read 1348 times)
moelski
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Feb 28th, 2011
Give the node from contextMenuStrip to Event?
Mar 3rd, 2011 at 3:27pm
Print Post  
Hi !

I have this Event to detect a right click and open up the context menu:
Code
Select All
private void diagram_NodeClicked(object sender, NodeEventArgs e)
{
  if (e.MouseButton == MouseButton.Right)
  {
     contextInput.Show(MousePosition);
  }
} 



e.node give me access to the corresponding node.

But how can I access this node if the user clicks on a context menu entry?

Greetz
Dominik
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Give the node from contextMenuStrip to Event?
Reply #1 - Mar 3rd, 2011 at 3:34pm
Print Post  
Hi,

Store a reference to it in a field of the form class; see the SiteMap sample project for an example. Or perhaps you could set it as Tag value of the ContextMenu object.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint