Talk:FMX.ScrollableForm Sample

From RAD Studio Code Examples
Jump to: navigation, search

Did not work Tform events are wrong values, in const Bounds: TRect (TOP), Always on a second call

procedure TForm1.FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); begin

   FKBBounds.Create(0,0,0,0);
   FNeedOffset := False;
   RestorePosition;

end;

procedure TForm1.FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); begin

   FKBBounds := TRectF.Create(Bounds);
   FKBBounds.TopLeft := ScreenToClient(FKBBounds.TopLeft);
   FKBBounds.BottomRight := ScreenToClient(FKBBounds.BottomRight);
   UpdateKBBounds;

end;