Hi.
I`ve added vertical TCursorTool.
When chart area is scrolled and TCursorTool has the same X position with the left border, TCursorTool automaticaly returns to the chart center.
Is this problem fixed?
TCursorTool problem
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi vvv,
I've been able to reproduce the problem here and added it to our defect list (TV52011317) to be fixed for future releases.
In the meantime, a workaround would be storing the tool's position in a variable every time you modify its position using its OnChange event. Then, when you scroll the chart, in the OnScroll event, you can assign that value stored to the tool.
I've been able to reproduce the problem here and added it to our defect list (TV52011317) to be fixed for future releases.
In the meantime, a workaround would be storing the tool's position in a variable every time you modify its position using its OnChange event. Then, when you scroll the chart, in the OnScroll event, you can assign that value stored to the tool.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Reply
Hi Narcís.
I`ve solved this problem with help to small modify teetools.pas file.
In basic Procedure TCursorTool.CalcScreenPositions execute condition:
//---
if (IPoint.X=-1) or (IPoint.Y=-1) then
begin
....
end
This condition must be execute for first initialization TCursorTool.
But when chart area is scrolled and TCursorTool has the same X position with the left border IPoint.X = -1 again.
This problem can be avoid if
1. In TCursorTool class adding variable
TCursorTool=class(TTeeCustomToolSeries)
private
......
LBeg : Boolean;
.....
2. In Constructor TCursorTool.Create(AOwner:TComponent);
begin
....
LBeg:=false;
....
end;
3. In Procedure TCursorTool.CalcScreenPositions:
//---
if {(IPoint.X=-1) or (IPoint.Y=-1)} (LBeg=False) then
begin
LBeg := True;
....
end;
That`s all.
I`ve solved this problem with help to small modify teetools.pas file.
In basic Procedure TCursorTool.CalcScreenPositions execute condition:
//---
if (IPoint.X=-1) or (IPoint.Y=-1) then
begin
....
end
This condition must be execute for first initialization TCursorTool.
But when chart area is scrolled and TCursorTool has the same X position with the left border IPoint.X = -1 again.
This problem can be avoid if
1. In TCursorTool class adding variable
TCursorTool=class(TTeeCustomToolSeries)
private
......
LBeg : Boolean;
.....
2. In Constructor TCursorTool.Create(AOwner:TComponent);
begin
....
LBeg:=false;
....
end;
3. In Procedure TCursorTool.CalcScreenPositions:
//---
if {(IPoint.X=-1) or (IPoint.Y=-1)} (LBeg=False) then
begin
LBeg := True;
....
end;
That`s all.