Page 1 of 1

CursorTool: snap to horizontal movements only?

Posted: Mon Sep 25, 2006 5:55 pm
by 9338109
Hello,

How can I make the cursor (cssHorizontal) to stay only with horizontal movements ?

I would like that my cursor follows the mouse and snaps to a series of my line chart (which it does), but it should not react on vertical movements of the mouse, just on horizontal movements.

Any Ideas?

George

Posted: Tue Sep 26, 2006 6:22 am
by 9343260
Maybe you can try to check the X, Y position in the OnMouseMove event.

Something like : if Y <> oldY, then movementVertical.

Do you see what i mean ?

Posted: Tue Sep 26, 2006 7:27 am
by narcis
Hi George,

Have you tried using something like this?

Code: Select all

  With ChartTool1 do
  begin
    Style:=cssVertical;
    Snap:=true;
    FollowMouse:=true;
    Series:=Series1;
  end;