mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
LCL: Temporary fix for focus jumping on Arrow keys between controls. Will be moved to WS code. Issue #22191, patch from AlexeyT.
git-svn-id: trunk@53933 -
This commit is contained in:
parent
fa280dc697
commit
b2658d37bc
@ -1102,4 +1102,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomComboBox.CMWantSpecialKey(var Message: TCMWantSpecialKey);
|
||||
begin
|
||||
{$ifdef darwin}
|
||||
// don't allow LCL to handle arrow keys for edit controls
|
||||
if Message.CharCode in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN] then
|
||||
Message.Result := 1
|
||||
else
|
||||
{$endif}
|
||||
inherited;
|
||||
end;
|
||||
|
||||
// included by stdctrls.pp
|
||||
|
@ -505,10 +505,12 @@ end;
|
||||
|
||||
procedure TCustomEdit.CMWantSpecialKey(var Message: TCMWantSpecialKey);
|
||||
begin
|
||||
{$ifdef darwin}
|
||||
// don't allow LCL to handle arrow keys for edit controls
|
||||
if Message.CharCode in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN] then
|
||||
Message.Result := 1
|
||||
else
|
||||
{$endif}
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
@ -316,6 +316,7 @@ type
|
||||
procedure MeasureItem(Index: Integer; var TheHeight: Integer); virtual;
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure LMChanged(var Msg); message LM_CHANGED;
|
||||
procedure CMWantSpecialKey(var Message: TCMWantSpecialKey); message CM_WANTSPECIALKEY;
|
||||
procedure Change; virtual;
|
||||
procedure Select; virtual;
|
||||
procedure DropDown; virtual;
|
||||
|
Loading…
Reference in New Issue
Block a user