ThinkGeo.com    |     Documentation    |     Premium Support

Contextmenu for shapes

In your HowDoISamples, under TrackAndEditShapes, we were able to draw and edit shapes. I wanted to have contextmenu for these drawn shapes so when user rght-click a shape, he can choose to delete it, and when mouse hover it, i can display information about that shape.


is there any way to do it, both contextmenu and tooltip for shapes?



Ric,


Thanks for your post and questions.
Attachment contains a demo for ContextMenu to delete the tracked shape.
 
Also following post shows how to build a Tooltip in Winforms & WPF, just take a look if you are interested.
gis.thinkgeo.com/Support/Dis...fault.aspx
 
Let me know if any more questions.
 
Thanks.
 
Yale

1352-ContextMenuSample.zip (25.1 KB)

Thanks Yale. 
  
 Your sample worked, but it uses winformsMap1_MapClick event and checks if it is the right mouse key. So it seems as of now, the shapes doesn’t support ContextMenu yet. It is fine that we can handle that by capturing the mouse event.

Ric, 
  
 Yes, you are right. Currently, in MapSuite component we do not support the built-in Context-Menu, you can handle it in built in Map-Click event or capturing the mouse event to handle it. 
  
 Any more questions just feel free to let me know. 
  
 Thanks. 
  
 Yale