mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 09:19:40 +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 SetShowInTaskbar(const AForm: TCustomForm; const AValue: TShowInTaskbar); override;
|
||||
class procedure ShowModal(const ACustomForm: TCustomForm); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TWinCEWSForm }
|
||||
@ -126,7 +127,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses Winceint;
|
||||
uses Winceint, wincewsmenus;
|
||||
|
||||
{ TWinCEWSScrollBox }
|
||||
|
||||
@ -454,4 +455,20 @@ begin
|
||||
BringWindowToTop(ACustomForm.Handle);
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user