Series OnClick and zoom enabled - undesirable effect

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Technicon
Newbie
Newbie
Posts: 43
Joined: Thu Aug 11, 2016 12:00 am
Contact:

Series OnClick and zoom enabled - undesirable effect

Post by Technicon » Thu Dec 01, 2016 9:41 am

Hello,

I have attached event OnClick to some series that displays some modal form.
When there is zoom enabled on that chart I get undesirable effect. When one click on that series the modal windows appear but after window is closed the zoom stays in "zoom mode" (zoom rectangle is visible until next click).
I used to overcome this by calling Abort() from OnClick event handler but now it is not working any more and throws some exceptions form chart.

Is there any way to workaround this undesirable behavior.

Best Regards,
Grzegorz

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

Re: Series OnClick and zoom enabled - undesirable effect

Post by Yeray » Thu Dec 01, 2016 3:38 pm

Hello Grzegorz,

Try with CancelMouse:

Code: Select all

procedure TForm1.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Chart1.CancelMouse:=true;
  ShowMessage('Series clicked');
end;
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

Technicon
Newbie
Newbie
Posts: 43
Joined: Thu Aug 11, 2016 12:00 am
Contact:

Re: Series OnClick and zoom enabled - undesirable effect

Post by Technicon » Fri Dec 02, 2016 6:00 am

Thank You, this is what I was looking for.

Best Regards,
Grzegorz

Post Reply