Hello,
I found a problem with the TAxisScrollTool which I think occurs only with Version 8.
When I'm scrolling an Axis using this tool, everything works fine except when the cursor is exactly over the axis line ! This behaviour looks strange and I think it is a bug.
To reproduce it, simply scroll the axis up and down, and move the mouse cursor over the axis line while scrolling.
This behaviour occurs also with TeeChartOffice 3.0.
[Solved] [v8] Bug with TAxisScrollTool
[Solved] [v8] Bug with TAxisScrollTool
Last edited by bertrod on Thu Oct 18, 2007 8:26 am, edited 1 time in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bertrod,
I'm not able to reproduce the problem here. I've made a little example and I've sent you its .exe. Could you please try running it at your end and let me know if it works fine for you?
Thanks in advance.
I'm not able to reproduce the problem here. I've made a little example and I've sent you its .exe. Could you please try running it at your end and let me know if it works fine for you?
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 |
Instructions - How to post in this forum |
Hi Narcis,
The exe you sent me worked fine. After some time, I finally could solve my problem with the AxisScrollTool.
I don't know if it can help you in any way, but here is my modification to solve this problem:
File : TeeTools.pas
Function : TAxisScrollTool.ChartMouseEvent
SubFunction : AxisClicked
OLD CODE
NEW CODE
Mybe it will help you understand what was going wrong with my tool. The variable "Axis" was correct, but Axis.Clicked always returned False when the mouse was exactly over the Axis line. Really strange problem I guess.
The exe you sent me worked fine. After some time, I finally could solve my problem with the AxisScrollTool.
I don't know if it can help you in any way, but here is my modification to solve this problem:
File : TeeTools.pas
Function : TAxisScrollTool.ChartMouseEvent
SubFunction : AxisClicked
OLD CODE
Code: Select all
if Assigned(Axis) then
begin
if Axis.Visible and Axis.Clicked(x,y) then // <-- prob here: Axis.Clicked returns False
result:=Axis;
end
else
with ParentChart do
for t:=0 to Axes.Count-1 do
if Axes[t].Visible and Axes[t].Clicked(x,y) then
begin
result:=Axes[t];
break;
end;
end;
Code: Select all
if Assigned(Axis) then
begin
if Axis.Visible and Axis.Clicked(x,y) then
result:=Axis
{ MODIFICATION START }
else
with ParentChart do
for t:=0 to Axes.Count-1 do
if Axes[t].Visible and Axes[t].Clicked(x,y) then
begin
result:=Axes[t];
break;
end;
{ MODIFICATION END }
end
else
with ParentChart do
for t:=0 to Axes.Count-1 do
if Axes[t].Visible and Axes[t].Clicked(x,y) then
begin
result:=Axes[t];
break;
end;
end;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bertrod,
Thanks for the information. I'm glad to hear you could solve the problem. This works fine here using our current sources.
Thanks for the information. I'm glad to hear you could solve the problem. This works fine here using our current sources.
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 |