I am using marksTip tool in my tchart to display the data point on the series.
Now the problem is, when the user clicks on the series the data point values are displayed.
Now I have another context (button) in my application on click of which the data point displayed should go away and user should be able to other things.
I tried doing marksTip.Active = false on click of button, but this does not hide or remove the data point that is already displayed. This code only ensures that the next click on the series will not result in display of data point, but how do I hide/remove the already shown data point?
How to hide the marktool text?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lakshmi,
To achieve what you request you'd better use an annotation tool and some code like:
To achieve what you request you'd better use an annotation tool and some code like:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
points1.FillSampleValues();
annotation1.Active=false;
}
private void SetCallout(int AIndex)
{
// Change annotation text
annotation1.Text="Point: "+AIndex.ToString()+"\r\n"+
"Value: "+points1.ValueMarkText(AIndex);
// Re-position annotation callout
annotation1.Callout.XPosition=points1.CalcXPos(AIndex);
annotation1.Callout.YPosition=points1.CalcYPos(AIndex);
annotation1.Callout.ZPosition=0;
}
private void points1_Click(object sender, System.Windows.Forms.MouseEventArgs e)
{
annotation1.Active=true;
annotation1.Callout.Arrow.Visible=true;
SetCallout(points1.Clicked(e.X,e.Y));
}
private void points1_MouseLeave(object sender, System.EventArgs e)
{
annotation1.Active=false;
}
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 |