detect cursortool and remove it
Posted: Thu Apr 26, 2007 12:23 pm
hi.. In my Application, the user can add 2 vertical cursortools to a teechart per right mouseclick on the chart in order to show the interval between these 2 cursortools.
The cursortools can be moved (right/left) with the mouse. But because of having a chart which has a lot of X points, it is not practical to use this method (Example: At first: show [15,100] then show [500,550] Actually i use datetime as x values).
So the user must be able to detect the cursortool with mouse and remove it, so that he can add it later again.
I tried to do:
But it dosent work, althogh the mouse pointer is on the cursortool.
Any Idea? Thanks...
The cursortools can be moved (right/left) with the mouse. But because of having a chart which has a lot of X points, it is not practical to use this method (Example: At first: show [15,100] then show [500,550] Actually i use datetime as x values).
So the user must be able to detect the cursortool with mouse and remove it, so that he can add it later again.
I tried to do:
Code: Select all
private void tChartAll_MouseClick(object sender, MouseEventArgs e)
{
...
if (e.Button == MouseButtons.Right)
{
if(delta1.XValue == tChartAll.Chart.Axes.Bottom.CalcPosPoint(e.X))
{
remove delta1...
}
....
Any Idea? Thanks...