Page 1 of 1

Pan with GestureManager on a second form doesn't work

Posted: Thu Mar 10, 2016 5:40 pm
by 16477805
I use a MainForm, and a second form with a TChart and a Gesturemanager on it.
If I call from MainForm the second form with SecondForm.Show; then the GestureManager
never sends a Pan-Gesture.

If you have only 1 MainForm and put a TChart and a GestureManager on it, Panning works.

In my FormCreate-Method I do the following:

Code: Select all

Chart1.Zoom.Allow:=False;
Chart1.Panning.Active:=False;
Chart1.AllowPanning:=TPanningMode.pmNone;
Chart1.ScrollMouseButton:=TMouseButton.mbLeft;
I don't want mixed Chart-Panning with Gesture-Zooming, I wanted to handle both, panning and zooming in the following matter:

Code: Select all

procedure TFormVertikale.Chart1Gesture(Sender: TObject;
  const EventInfo: TGestureEventInfo; var Handled: Boolean);
begin
  if EventInfo.GestureID = igiZoom then
     handleZoom(EventInfo);
  if EventInfo.GestureID = igiPan then
     handlePan(EventInfo);
  if EventInfo.GestureID = igiDoubleTap then
     handleDoubleTap(EventInfo);

  Handled:=True;
end;
A break point inside handlePan() will never be jumped.

I have tested with the newest TChartVCL2015.2016.exe and with newest RAD Studio Seattle 10 Subscription Update 1.

How do I get Panning in the second form working, if been shown from the main form ??

Bye the way, I compile my TChart-FMX-Sample under Android to a Samsung Note 10.1

Re: Pan with GestureManager on a second form doesn't work

Posted: Mon Mar 14, 2016 3:45 pm
by yeray
Hello,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: Pan with GestureManager on a second form doesn't work

Posted: Wed Mar 16, 2016 5:03 pm
by 16477805
Ok, I will write a small test app for Android with Firemonkey earliest at the next weekend. I hope, that the the same problem occurs once again :lol:

Bye

Re: Pan with GestureManager on a second form doesn't work

Posted: Sun Mar 20, 2016 6:46 pm
by 16477805
Now, when I wrote the sample code, panning with gesture (set a breakpoint in handlePan and debug the app) in a second form suddenly works without any problems ??

What the hell is the difference to my main project ??

I must look inside my Chart settings of my project, that I am working on, in the next days.

Nevertheless I attached the sample code.

Thanks for your support.

Re: Pan with GestureManager on a second form doesn't work

Posted: Mon Mar 21, 2016 10:35 am
by yeray
Hello,

I'm glad to hear it doesn't sound as a TeeChart problem!
Don't hesitate to let us know if you fins any problem with it.