We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

contextmenustrip diagram 5.102.0.51

I am trying the release 5.102.51.
I am trying to associate a contextmenustrip to a diagram this worked in release 4.4.0.51.
When I attempt to access the contextmenu with my right most mouse button it never displays.

I have attached a sample program based on dynamic symbol that displays the symptom.

Thanks

Ray.

CS63.zip

1 Reply

MF Meera Fathima Syncfusion Team June 20, 2007 08:58 AM UTC


Hello Ray,

Thanks for sending the sample. It seems the Diagram.MouseUp event is not there in the sample that you have attached with this. I have modified the sample to use Diagram.MouseUp() event method and called the ContextMenuStrip.Show() method within this event. Below is the sample code snippet for your reference.

this.diagram.MouseUp += new System.Windows.Forms.MouseEventHandler(this.diagram_MouseUp);

private void diagram_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
this.contextMenuStrip1.Show(this.diagram, e.X,e.Y);
}
}

As with the above code, the application shows the context menu as expected. I have also attached the modified sample with this. You can get the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F62632/main.htm

Please look into the sample and let me know if have any more question regarding this.

Thanks,
Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon