mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:39:23 +02:00
wince: fixes the case when a form has no menu in atKeyPadDevice mode
git-svn-id: trunk@26893 -
This commit is contained in:
parent
c8c02dad27
commit
02fc6db99f
@ -89,6 +89,7 @@ type
|
|||||||
class procedure SetIcon(const AForm: TCustomForm; const Small, Big: HICON); override;
|
class procedure SetIcon(const AForm: TCustomForm; const Small, Big: HICON); override;
|
||||||
class procedure SetShowInTaskbar(const AForm: TCustomForm; const AValue: TShowInTaskbar); override;
|
class procedure SetShowInTaskbar(const AForm: TCustomForm; const AValue: TShowInTaskbar); override;
|
||||||
class procedure ShowModal(const ACustomForm: TCustomForm); override;
|
class procedure ShowModal(const ACustomForm: TCustomForm); override;
|
||||||
|
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWinCEWSForm }
|
{ TWinCEWSForm }
|
||||||
@ -126,7 +127,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses Winceint;
|
uses Winceint, wincewsmenus;
|
||||||
|
|
||||||
{ TWinCEWSScrollBox }
|
{ TWinCEWSScrollBox }
|
||||||
|
|
||||||
@ -454,4 +455,20 @@ begin
|
|||||||
BringWindowToTop(ACustomForm.Handle);
|
BringWindowToTop(ACustomForm.Handle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWinCEWSCustomForm.ShowHide(const AWinControl: TWinControl);
|
||||||
|
var
|
||||||
|
lForm: TCustomForm absolute AWinControl;
|
||||||
|
begin
|
||||||
|
TWinCEWSWinControl.ShowHide(AWinControl);
|
||||||
|
|
||||||
|
// In atPDA mode, if there is no menu installed, we need to remove
|
||||||
|
// the menu of the previously focused application, otherwise it will
|
||||||
|
// remain visible
|
||||||
|
if (Application.ApplicationType = atKeyPadDevice) and
|
||||||
|
(lForm.Menu = nil) then
|
||||||
|
begin
|
||||||
|
CeSetMenu(AWinControl.Handle, 0, nil);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user