01-15-2011 11:28 AM
Hi to all,
Does anyone know how to implement right-clicking an XyPointAnnotation to popup a menu? This is not one of the default events.
Thanks in advance,
CD
Solved! Go to Solution.
01-15-2011 11:40 AM
Actually, I figured it out myself. For those interested, here is the VB.net code.
Private Sub gr_PlotAreaMouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles gr.PlotAreaMouseDown Dim ann As NationalInstruments.UI.XYPointAnnotation = gr.GetAnnotationAt(e.X, e.Y) If Not IsNothing(ann) Then ContextMenuStrip1.Show(sender, e.X, e.Y) End If End Sub