Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Parnassus.FMXContainer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ TFireMonkeyContainer = class(TWinControl)
FOnDestroyForm : TOnDestroyFMXFormEvent;
FCreateFormCalled : Boolean;
FHandlingFMXActivation : Boolean;
FAllowTabKey : Boolean;

procedure DoOnCreate;
procedure DoOnDestroy;
Expand Down Expand Up @@ -98,6 +99,7 @@ TFireMonkeyContainer = class(TWinControl)
property FireMonkeyFormHandle : HWND read GetHostedFMXFormWindowHandle;
property OnCreateFMXForm : TOnCreateFMXFormEvent read FOnCreateForm write FOnCreateForm;
property OnDestroyFMXForm : TOnDestroyFMXFormEvent read FOnDestroyForm write FOnDestroyForm;
property AllowTabKey: Boolean read FAllowTabKey write FAllowTabKey default False;
property Align;
property Anchors;
property Constraints;
Expand Down Expand Up @@ -232,6 +234,7 @@ constructor TFireMonkeyContainer.Create(Owner: TComponent);
FNewFMXWndProc := nil;
FCreateFormCalled := false;
FHandlingFMXActivation := false;
FAllowTabKey := False; //if true Tab is handled inside the FMX form
TabStop := true; // Want to be focused on tabs
end;

Expand Down Expand Up @@ -674,6 +677,8 @@ procedure TFireMonkeyContainer.WMGetDlgCode(var Msg: TMessage);
begin
// From http://stackoverflow.com/questions/5632411/arrow-key-not-working-in-component
Msg.Result := DLGC_WANTALLKEYS or DLGC_WANTARROWS or DLGC_WANTCHARS;
if FAllowTabKey then
Msg.Result := Msg.Result or DLGC_WANTTAB; //handle Tabs
if Msg.lParam <> 0 then
begin
M := PMsg(Msg.lParam);
Expand Down