Delphi2005: TCursorTool

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mike G
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: Oxford

Delphi2005: TCursorTool

Post by Mike G » Tue Jan 25, 2005 8:47 pm

I find that using TcursorTool to plot a line on a chart does not seem to function in Delphi2005. Or at least my program that used to work doesnt seem to work under Delphi 5. It compiles OK but does not plot the cursor line on the chart screen.

Mike Glazer

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

Post by Narcís » Wed Jan 26, 2005 8:31 am

Hi Mike,

Could you please post the code you are using for creating the TCursorTool or post small project we can run "as-is" so we can reproduce the problem here? The project should be posted at the steema.public.attachments newsgroup.

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

Mike G
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: Oxford

TCursorTools in Delphi2005

Post by Mike G » Wed Jan 26, 2005 3:00 pm

Hi Narcis
This is a routine taken from my program (which used to work well under Delph6). The routine is to toggle a vertical yellow cursor onto a Chart, the position being set up elsewhere in the program.

var MyCursor: TCursorTool;

procedure TForm1.MarkLineClick(Sender: TObject);
begin
If MarkNewLIne= -1 then
begin

MyCursor.free;
MarkNewLine:= 1;
exit;
end;
MyCursor:=TCursorTool.Create(Self);
MyCursor.Style:= cssVertical ;
MyCursor.Pen.Style:= psSolid;
MyCursor.Pen.Mode:= pmNotXor;
MyCursor.Pen.Color:= clYellow;
MyCursor.Pen.Width:= 6;
MyCursor.RedrawCursor;
MyCursor.Visible:= true;
MyCursor.FollowMouse:= false;
MyCursor.ParentChart:=Chart;
MarkNewLine:= -MarkNewLine;
end;


The actual drawing of the cursor line is by
MyCursor.XValue:= StrTime;
in another procedure.

Mike

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

Post by Narcís » Wed Jan 26, 2005 4:58 pm

Hi Mike,

The problem is the TCursorTool.Pen.Width property in Delphi 2005. If its value is bigger than 1 then the Cursor Tool is not displayed. I have included this error in our bug list to be fixed for the next releases. Meanwhile the only workaround is setting the width to 1.
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

Mike G
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: Oxford

TCursorTool in Delphi2005

Post by Mike G » Wed Jan 26, 2005 7:48 pm

Thanks Narcis.
Will users receive notification of the nmext revision?

Mike

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

Post by Narcís » Thu Jan 27, 2005 9:29 am

Hi Mike,

This has been fixed for the upcoming v7.04 version. Just stay tunned to the forums or have a look a the customer download area because it will be released soon.
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