Different mouse cursor for different parts of chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PoLabs
Newbie
Newbie
Posts: 17
Joined: Mon Sep 01, 2014 12:00 am

Different mouse cursor for different parts of chart

Post by PoLabs » Tue Feb 17, 2015 12:06 pm

Hi,

is it possible to have different mouse cursor for different parts of chart? In one area I would like to have crHandPoint and in other part I would like to have crDefault. How to do that?

Currently I am handling onMouseMove event and when I detect point is in the rectangle I try to set Chart.Cursor = crHandPoint but somehow gets changed back to crDefault.

Thanks.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Different mouse cursor for different parts of chart

Post by Yeray » Tue Feb 17, 2015 2:12 pm

Hello,

This seems to work fine for me here:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TLineSeries).FillSampleValues;
end;

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if (Chart1.Legend.Clicked(X, Y)>-1) then
    Chart1.Cursor:=crHandPoint;
end;
Could you please modify the above or to arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply