I would like to add a click event to annotation tool array created at runtime
NumAnnoText=NumAnnoText+1
Dim AnnotationChart() As Steema.TeeChart.Tools.RectangleTool
ReDim Preserve AnnotationChart(NumAnnoText)
AnnotationChart(NumAnnoText) = New Steema.TeeChart.Tools.RectangleTool(TChart1.Chart)
Is it possible to add a click event?
Adding click event to annotation
Re: Adding click event to annotation
Hello lilo,
To use the click event of annotation tool you only need do next:
C#
VB
Can you tell if it works as you expect?
I hope will helps.
Thanks,
To use the click event of annotation tool you only need do next:
C#
Code: Select all
public Form1()
{
InitializeComponent();
ann.Click += new MouseEventHandler(ann_Click);
}
void ann_Click(object sender, MouseEventArgs e)
{
this.Text = e.X.ToString()+","+e.Y.ToString();
}
Code: Select all
Public Sub New()
InitializeComponent()
AddHandler ann.Click, Addressof ann_Click;
End Sub
Private Sub ann_Click(sender As Object, e As MouseEventArgs)
Me.Text = e.X.ToString() & "," & e.Y.ToString()
End Sub
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |