Pan with GestureManager on a second form doesn't work
Posted: Thu Mar 10, 2016 5:40 pm
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:
I don't want mixed Chart-Panning with Gesture-Zooming, I wanted to handle both, panning and zooming in the following matter:
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
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;
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;
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