TDragPointTool and mouse pointer

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

TDragPointTool and mouse pointer

Post by johnnix » Fri Apr 01, 2011 6:45 am

Hello,

I use TChart 2010 and I noticed that although my TDragPointTool is set to active=false the pointer cursor changes when the mouse is over a point. Would it be "better" not to use the TDragPointTool.Cursor when this tool is not active?

Regards

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

Re: TDragPointTool and mouse pointer

Post by Narcís » Fri Apr 01, 2011 11:33 am

Hi johnnix,

I'm not able to reproduce the problem here using code below. Does this work fine for you? Which TeeChart 2010 build are you using? Can you please modify the code below so that we can reproduce the problem here?

Code: Select all

uses Series, TeeDragPoint;

procedure TForm1.FormCreate(Sender: TObject);
var DragPoints1: TDragPointTool;
begin
  Chart1.AddSeries(TPointSeries.Create(Self)).FillSampleValues;

  DragPoints1:=TDragPointTool.Create(Self);
  DragPoints1.Series:=Chart1[0];
  DragPoints1.Active:=False;
  Chart1.Tools.Add(DragPoints1);
end;
Thanks in advance.
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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: TDragPointTool and mouse pointer

Post by johnnix » Sat Apr 02, 2011 11:19 am

Hello Narcis,

Yes, your code works ok because you have not defined a different cursor style. Please try the following code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var DragPoints1: TDragPointTool;
begin
  Chart1.AddSeries(TPointSeries.Create(Self)).FillSampleValues;

  DragPoints1:=TDragPointTool.Create(Self);
  DragPoints1.Series:=Chart1[0];
  DragPoints1.Active:=False;
  DragPoints1.Series.Cursor := crhourglass;
  Chart1.Tools.Add(DragPoints1);
end;
Regards

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

Re: TDragPointTool and mouse pointer

Post by Narcís » Mon Apr 04, 2011 8:00 am

Hi johnnix,

Ok, thanks for the info. I don't think this is a bug. You are changing the cursor of the series associated to the DragPoints tool, not the tool itself. This is the same to do this:

Code: Select all

  Chart1[0].Cursor:=crHourGlass;
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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: TDragPointTool and mouse pointer

Post by johnnix » Mon Apr 04, 2011 8:05 am

Hello,

Thank you for your reply. I guess that the property Cursor under the TDragPointTool is misleading then :) Either it should not be there or be applicable only when the tools is enabled (it should be a tool property and not a series one).

Regards

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

Re: TDragPointTool and mouse pointer

Post by Narcís » Mon Apr 04, 2011 8:33 am

Hi johnnix,

This property clearly indicates that it's Series.Cursor not tool's cursor. When you access a series associated to a tool you can access all its properties.

Anyway, I'll add a Cursor property for the TDragPointTool to the wish-list.
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

Post Reply