Page 1 of 1

TDragPointTool and mouse pointer

Posted: Fri Apr 01, 2011 6:45 am
by 10046032
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

Re: TDragPointTool and mouse pointer

Posted: Fri Apr 01, 2011 11:33 am
by narcis
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.

Re: TDragPointTool and mouse pointer

Posted: Sat Apr 02, 2011 11:19 am
by 10046032
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

Re: TDragPointTool and mouse pointer

Posted: Mon Apr 04, 2011 8:00 am
by narcis
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;

Re: TDragPointTool and mouse pointer

Posted: Mon Apr 04, 2011 8:05 am
by 10046032
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

Re: TDragPointTool and mouse pointer

Posted: Mon Apr 04, 2011 8:33 am
by narcis
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.