[Solved] [v8] Bug with TAxisScrollTool

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[Solved] [v8] Bug with TAxisScrollTool

Post by bertrod » Thu Aug 30, 2007 10:54 am

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.
Last edited by bertrod on Thu Oct 18, 2007 8:26 am, edited 1 time in total.

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 Aug 30, 2007 1:39 pm

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.
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

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Thu Oct 18, 2007 8:26 am

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

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;
NEW CODE

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;
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.

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

Post by Narcís » Mon Oct 22, 2007 1:37 pm

Hi bertrod,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply