08-08-2012 11:09 AM
I want to allow the user to right click on an annotation caption and pop up a menu that allows them to edit the text or delete the annotation. Obviously there is code somewhere that detects when my mouse is over the annotation caption because it changes my cursor to indicate I can move the text around. Am I able to do a similar thing to indicate when I right click on the caption text?
Solved! Go to Solution.
08-09-2012 05:26 PM
VHalbur,
It appears that there is not an event that can be captured for a right-click or even a general mouse down event on a caption.
As an alternative, you could provide an edit button on the form that pops up a dialog allowing them to change any caption. You can retrieve the list of annotations using the waveformGraph.Annotations property of the graph. You can both get/set the text of each annotation programatically using this method.
Also, you can capture the right-click event of the entire graph, but there is not a way to ensure that this event is only fired when an annotation is right-clicked.
08-10-2012 09:16 AM
When the mouse is over an annotation caption, the cursor changes to SizeAll. So I captured a right-click event on the graph and display the menu if the cursor is SizeAll. Otherwise I ignore it. Thanks for your reply.