TCursorTool.YValue not set
Posted: Fri Jun 18, 2010 8:31 am
Hi,
I have a problem with setting TCurosorTool.YValue property.
I have the code like:
First time when I call this code the cursor's YValue is always set at 0, regardles the product of Level*Koef is different than zero. So if I add breakpoint and add Cursor.YValue to watch list I can see 0 all the time. If I inspect the Level * Koef I get something that is it different from 0 (eg. -8,9) but cursor Y value remains 0 (and only the first time I call this).
Thanks for your help.
Br
I have a problem with setting TCurosorTool.YValue property.
I have the code like:
Code: Select all
Cursor.Visible := true;
Cursor.Series := TCustomSeries(Chart.SeriesList[Idx]);
// prevent calling event handler on changing Cursor
T := Trigger.OnChange;
Cursor.OnChange := nil;
if (Level * Koef > Chart.LeftAxis.Maximum) then
Cursor.YValue := Chart.LeftAxis.Maximum else
if (Level * Koef < Chart.LeftAxis.Minimum) then
Cursor.YValue := Chart.LeftAxis.Minimum else
Cursor.YValue := Level * Koef ;
// set old event handler
Cursor.OnChange := T;
Thanks for your help.
Br