Hi,
What is the best to select and delete annotation rectangle already placed on a chart?
Select and Delete Annotation Rectangle
Re: Select and Delete Annotation Rectangle
Hello lilo,
Can you explain exactly, step to step, what do you achieve that annotation do in your application?
Thanks,
Can you explain exactly, step to step, what do you achieve that annotation do in your application?
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 |
Re: Select and Delete Annotation Rectangle
Hello lilo,
If what you want is to select an annotation clicking over it and remove it with, for example, the "Supr" key, you could use the Selector Tool and the events as follows:
If what you want is to select an annotation clicking over it and remove it with, for example, the "Supr" key, you could use the Selector Tool and the events as follows:
Code: Select all
private Steema.TeeChart.Tools.Selector sel1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
sel1 = new Steema.TeeChart.Tools.Selector(tChart1.Chart);
Steema.TeeChart.Tools.Annotation annot = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
annot.Left = 100;
annot.Top = 100;
annot.Text = "Testing annotation";
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
tChart1.KeyDown += new KeyEventHandler(tChart1_KeyDown);
}
void tChart1_KeyDown(object sender, KeyEventArgs e)
{
if ((sel1.Selection is Steema.TeeChart.Tools.Annotation) && (e.KeyData == Keys.Delete))
{
tChart1.Tools.Remove(sel1.Selection as Steema.TeeChart.Tools.Annotation);
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Select and Delete Annotation Rectangle
Thanks Yeray, That's what I want to do.