Page 1 of 1

Series OnClick and zoom enabled - undesirable effect

Posted: Thu Dec 01, 2016 9:41 am
by 16578912
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

Re: Series OnClick and zoom enabled - undesirable effect

Posted: Thu Dec 01, 2016 3:38 pm
by yeray
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;

Re: Series OnClick and zoom enabled - undesirable effect

Posted: Fri Dec 02, 2016 6:00 am
by 16578912
Thank You, this is what I was looking for.

Best Regards,
Grzegorz