Page 1 of 1
How to make tooltips never leave until mouse move out
Posted: Wed Jan 14, 2009 9:13 am
by 13050783
Currently we can use AutoPopDelay to set the time that tooltips will stay. Is it possible to tooltips never leave until mouse move out ?
Thank you very much.
Regards,
Forest
Posted: Wed Jan 14, 2009 10:50 am
by 10050769
Hello mks-ydi,
For the moment is not possible to use AutoPopDelay to set the time that tooltips will stay, why I recomended than you use Annotation tools.
You can use annotation tools, with events ClickSeries or MouseMove.
You can use this code for exemple:
Code: Select all
private void tChart1_MouseMove(object sender, MouseEventArgs e)
{
int index = bar1.Clicked(e.X, e.Y);
if (index != -1)
{
anotation1.Active = true;
anotation1.Text = bar1.YValues[index].ToString();
anotation1.Left = e.X;
anotation1.Top = e.Y - anotation1.Height;
}
else
{
anotation1.Active = false;
}
}
I hope than my help is usefull for you.
Best Regards,
Sandra Pazos
Steema Support Central
http://support.steema.com
Another problem
Posted: Thu Jan 15, 2009 7:43 am
by 13050783
Hello Sandra Pazos,
Your reply really help us. Thank you very much. But annotation has a problem. We usually put the chart in a container, and sometimes the annotation can not be totally displayed,hidden by the border and its outside region of the container. I mean it is not always on top as tooltips does. How can we do this?
Regards,
Forest
Posted: Thu Jan 15, 2009 10:13 am
by 10050769
Hello mks-ydi,
We have found a way for your problem. You have used a very simple tooltip in the MouseEvent or SeriesClick, as you will see on next exemple:
Code: Select all
private void tChart1_MouseMove(object sender, MouseEventArgs e)
{
int index = bar1.Clicked(e.X, e.Y);
if (index != -1)
{
string tmpText = bar1.YValues[index].ToString();
if (tChart1.Chart.ToolTip.Text != tmpText)
{
tChart1.Chart.ToolTip.Text = tmpText;
tChart1.Chart.ToolTip.Show();
}
}
else
{
tChart1.Chart.ToolTip.Hide();
}
}
I hope than this code help you.
Best Regards,
Sandra Pazos
Steema Support Central
http://support.steema.com