mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 19:40:54 +02:00
LCL: TCustomMemo should not trigger OnEditingDone when return is pressed and WantReturns=True.Patch by wp. issue #26769
git-svn-id: trunk@46320 -
This commit is contained in:
parent
e2ca5560c5
commit
cab06a0777
@ -202,6 +202,17 @@ begin
|
|||||||
Result := TWSCustomMemoClass(WidgetSetClass).GetCaretPos(Self);
|
Result := TWSCustomMemoClass(WidgetSetClass).GetCaretPos(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
Prevents false firing of the OnEditingDone event if the memo accepts the
|
||||||
|
RETURN key for new-line input.
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TCustomMemo.KeyUpAfterInterface(var Key: Word; Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if (Key = VK_RETURN) and FWantReturns then
|
||||||
|
Key := 0;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomMemo.SetLines
|
Method: TCustomMemo.SetLines
|
||||||
Params:
|
Params:
|
||||||
|
@ -816,6 +816,7 @@ type
|
|||||||
procedure RealSetText(const Value: TCaption); override;
|
procedure RealSetText(const Value: TCaption); override;
|
||||||
function GetCachedText(var CachedText: TCaption): boolean; override;
|
function GetCachedText(var CachedText: TCaption): boolean; override;
|
||||||
function GetCaretPos: TPoint; override;
|
function GetCaretPos: TPoint; override;
|
||||||
|
procedure KeyUpAfterInterface(var Key: Word; Shift: TShiftState); override;
|
||||||
procedure SetCaretPos(const Value: TPoint); override;
|
procedure SetCaretPos(const Value: TPoint); override;
|
||||||
procedure SetLines(const Value: TStrings);
|
procedure SetLines(const Value: TStrings);
|
||||||
procedure SetSelText(const Val: string); override;
|
procedure SetSelText(const Val: string); override;
|
||||||
|
Loading…
Reference in New Issue
Block a user