Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Enable Right Click Context Menu (Read 1301 times)
Dimah
YaBB Newbies
*
Offline


May Peace Be Upon you...

Posts: 1
Joined: Oct 8th, 2009
Enable Right Click Context Menu
Oct 8th, 2009 at 3:20pm
Print Post  
Hi

Can you pls post sample code for enabling the right click of the each custom shape node to populate the context menu and how to trigger the event for the each menu.

Thanks
PDM.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Enable Right Click Context Menu
Reply #1 - Oct 8th, 2009 at 4:35pm
Print Post  
Hi,

E.g. the DirTree sample project displays a context menu like this:

Code
Select All
private void dirDiagram_NodeClicked(object sender, NodeEventArgs e)
{
	if (e.MouseButton != MouseButton.Right)
		return;

	// display context menu at right mouse click
	currentFolder = e.Node as ShapeNode;
	cmFolder.Show(this, PointToClient(MousePosition));
} 



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