mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
lcl: don't insert Enter key to TMemo if WantReturns is set to False
git-svn-id: trunk@41673 -
This commit is contained in:
parent
bf6d88f9ad
commit
b3ce447a57
@ -276,6 +276,13 @@ begin
|
||||
Result.CY := 90;
|
||||
end;
|
||||
|
||||
procedure TCustomMemo.UTF8KeyPress(var UTF8Key: TUTF8Char);
|
||||
begin
|
||||
inherited UTF8KeyPress(UTF8Key);
|
||||
if not WantReturns and (UTF8Key = #13) then
|
||||
UTF8Key := '';
|
||||
end;
|
||||
|
||||
procedure TCustomMemo.SetWantTabs(const NewWantTabs: boolean);
|
||||
begin
|
||||
if FWantTabs = NewWantTabs then exit;
|
||||
|
@ -822,6 +822,7 @@ type
|
||||
procedure CMWantSpecialKey(var Message: TCMWantSpecialKey); message CM_WANTSPECIALKEY;
|
||||
procedure WMGetDlgCode(var Message: TLMNoParams); message LM_GETDLGCODE;
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
Loading…
Reference in New Issue
Block a user