Hi Steema Support,
How to get DrawLine Tool doubleclicked event. Or we can say How to get DrawLine Tool doubleclicked.
Thanks in advance.
Thanks&Regards
PlanoResearch
DrawLine Tool clicked event
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: DrawLine Tool clicked event
Hi PlanoResearch,
DoubleClick event is not implemented for the DrawLine tool. However, you can easily implement it combining TChart's MouseDown and DoubleClick events as in the code snippet below.
DoubleClick event is not implemented for the DrawLine tool. However, you can easily implement it combining TChart's MouseDown and DoubleClick events as in the code snippet below.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
FastLine fastLine1 = new FastLine(tChart1.Chart);
fastLine1.FillSampleValues();
drawLine1 = new Steema.TeeChart.Tools.DrawLine(tChart1.Chart);
tChart1.DoubleClick += tChart1_DoubleClick;
tChart1.MouseDown += tChart1_MouseDown;
}
private Steema.TeeChart.Tools.DrawLine drawLine1;
private Point mousePos;
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
mousePos = new Point(e.X, e.Y);
}
void tChart1_DoubleClick(object sender, EventArgs e)
{
if (!mousePos.IsEmpty)
{
Steema.TeeChart.Tools.DrawLineItem dli = drawLine1.Clicked(mousePos.X, mousePos.Y);
}
}
Best Regards,
Narcís Calvet / 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 |