Page 1 of 1

Delphi2005: TCursorTool

Posted: Tue Jan 25, 2005 8:47 pm
by 8438402
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

Posted: Wed Jan 26, 2005 8:31 am
by narcis
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.

TCursorTools in Delphi2005

Posted: Wed Jan 26, 2005 3:00 pm
by 8438402
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

Posted: Wed Jan 26, 2005 4:58 pm
by narcis
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.

TCursorTool in Delphi2005

Posted: Wed Jan 26, 2005 7:48 pm
by 8438402
Thanks Narcis.
Will users receive notification of the nmext revision?

Mike

Posted: Thu Jan 27, 2005 9:29 am
by narcis
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.