[Solved] TChartAxis cursor, possible to change ?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[Solved] TChartAxis cursor, possible to change ?

Post by bertrod » Mon Jan 14, 2008 2:45 pm

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.
Last edited by bertrod on Mon Jan 14, 2008 3:22 pm, edited 1 time in total.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jan 14, 2008 3:14 pm

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;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Mon Jan 14, 2008 3:21 pm

Hi Narcis,

Thanks for the quick answer :wink:

Post Reply