Page 1 of 1

[Solved] TChartAxis cursor, possible to change ?

Posted: Mon Jan 14, 2008 2:45 pm
by 9343260
Hello,

Is there a way to change the cursor of the mouse passing over TChartAxis ? It is crHandpoint by default, but I'd like to change it.

Thanks.

Posted: Mon Jan 14, 2008 3:14 pm
by narcis
Hi bertrod,

Yes, you can do something like this:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var i: integer;
begin
  for i:=0 to Chart1.Axes.Count-1 do
  begin
    if Chart1.Axes[i].Clicked(X,Y) then
    begin
      Chart1.Cursor:=crCross;
      Chart1.Refresh;
    end
    else
      begin
        Chart1.Cursor:=crDefault;
      end;
  end;
end;

Posted: Mon Jan 14, 2008 3:21 pm
by 9343260
Hi Narcis,

Thanks for the quick answer :wink: