OnClick event for arrow in TArrowSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Rolf Fankhauser
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

OnClick event for arrow in TArrowSeries

Post by Rolf Fankhauser » Thu Dec 20, 2012 3:37 pm

Hi all,

Is there an event for clicking on (or moving over) an arrow in a TArrowSeries? I can only click on the start point of the arrow but not on the arrow. I would like to implement that the cursor changes to crHandPoint if it is over an arrow and to show some data in a popup window if the arrow is clicked. Possible?

Thanks in advance for any help!

Best regards,

Rolf

Rolf Fankhauser
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

Re: OnClick event for arrow in TArrowSeries

Post by Rolf Fankhauser » Thu Dec 20, 2012 6:26 pm

It seems to be a bug in an older version. In C++Builder XE2 with TChart Std v2011.03.32815 it's working! I used OnMouseEnter and OnMouseLeave to set the cursor style.
But when I click the button of the popup window to close it, a white zoom frame is drawn from the point where I clicked the arrow to the point where I closed the popup window. How can I prevent this (the drawing of the zoom frame)? I have to click again to get rid of the zoom frame but then the chart is zoomed what wasn't intended.
A possible workaround: I could deactivate zooming and add a button to enable zooming.

Best regards, Rolf

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnClick event for arrow in TArrowSeries

Post by Yeray » Fri Dec 21, 2012 3:02 pm

Hi Rolf,
Rolf Fankhauser wrote:But when I click the button of the popup window to close it, a white zoom frame is drawn from the point where I clicked the arrow to the point where I closed the popup window. How can I prevent this (the drawing of the zoom frame)? I have to click again to get rid of the zoom frame but then the chart is zoomed what wasn't intended.
I've tried the following code but I don't see this effect:

Code: Select all

uses ArrowCha;

procedure TForm1.FormCreate(Sender: TObject);
begin
  with Chart1.AddSeries(TArrowSeries) as TArrowSeries do
  begin
    FillSampleValues(5);
    ArrowWidth:=32;
    ArrowHeight:=24;
  end;
end;

procedure TForm1.Chart1ClickSeries(Sender: TCustomChart;
  Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  with TForm.Create(Self) do
  begin
    Width:=100;
    Height:=100;
    Left:=Form1.Left+Chart1.Left+X-50;
    Top:=Form1.Top+Chart1.Top+Y;
    ShowModal;
  end;
end;
Could you please modify the code above or arrange a simple example project we can run as-is to reproduce the problem here?
Rolf Fankhauser wrote:A possible workaround: I could deactivate zooming and add a button to enable zooming.
It sounds as a possible workaround. However, if we can reproduce the problem here we'll study if disabling the zooming feature at OnMouseEnter or some other event solves the problem too.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply