mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-02 12:29:56 +02:00
LCL: memo: handle ESC in LM_GETDLGCODE (pass it)
git-svn-id: trunk@58260 -
This commit is contained in:
parent
6ccdb67ff4
commit
b7a40b3691
@ -239,18 +239,22 @@ end;
|
||||
procedure TCustomMemo.WMGetDlgCode(var Message: TLMGetDlgCode);
|
||||
begin
|
||||
inherited;
|
||||
if Message.CharCode = VK_TAB then
|
||||
begin
|
||||
if WantTabs then
|
||||
Message.Result := Message.Result or (DLGC_WANTTAB or DLGC_WANTALLKEYS)
|
||||
else
|
||||
Message.Result := Message.Result and not (DLGC_WANTTAB or DLGC_WANTALLKEYS);
|
||||
end;
|
||||
if Message.CharCode = VK_RETURN then
|
||||
begin
|
||||
if WantReturns then
|
||||
Message.Result := Message.Result or DLGC_WANTALLKEYS
|
||||
else
|
||||
case Message.CharCode of
|
||||
VK_TAB:
|
||||
begin
|
||||
if WantTabs then
|
||||
Message.Result := Message.Result or (DLGC_WANTTAB or DLGC_WANTALLKEYS)
|
||||
else
|
||||
Message.Result := Message.Result and not (DLGC_WANTTAB or DLGC_WANTALLKEYS);
|
||||
end;
|
||||
VK_RETURN:
|
||||
begin
|
||||
if WantReturns then
|
||||
Message.Result := Message.Result or DLGC_WANTALLKEYS
|
||||
else
|
||||
Message.Result := Message.Result and not DLGC_WANTALLKEYS;
|
||||
end;
|
||||
VK_ESCAPE:
|
||||
Message.Result := Message.Result and not DLGC_WANTALLKEYS;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user