mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 23:59:40 +01:00
LCL: added Begin/EndUpdate in TCustomMemo.SetSelText, implemented SetUpdateState for memo lines in the win32 widgetset, fixes (8702)
git-svn-id: trunk@10974 -
This commit is contained in:
parent
3b5518415e
commit
f73e81e3de
@ -162,6 +162,16 @@ begin
|
|||||||
FLines.Assign(Value);
|
FLines.Assign(Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomMemo.SetSelText(const Val: string);
|
||||||
|
begin
|
||||||
|
Lines.BeginUpdate;
|
||||||
|
try
|
||||||
|
inherited SetSelText(Val);
|
||||||
|
finally
|
||||||
|
Lines.EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
procedure TCustomMemo.SetScrollbars(const Value : TScrollStyle);
|
procedure TCustomMemo.SetScrollbars(const Value : TScrollStyle);
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ TWin32MemoStrings = class(TStrings)
|
|||||||
function GetCount: integer; override;
|
function GetCount: integer; override;
|
||||||
function Get(Index : Integer) : string; override;
|
function Get(Index : Integer) : string; override;
|
||||||
//procedure SetSorted(Val : boolean); virtual;
|
//procedure SetSorted(Val : boolean); virtual;
|
||||||
|
procedure SetUpdateState(Updating: Boolean); override;
|
||||||
public
|
public
|
||||||
constructor Create(Handle: HWND; TheOwner: TWinControl);
|
constructor Create(Handle: HWND; TheOwner: TWinControl);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -82,6 +83,13 @@ begin
|
|||||||
Setlength(Result, len);
|
Setlength(Result, len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWin32MemoStrings.SetUpdateState(Updating: Boolean);
|
||||||
|
begin
|
||||||
|
Windows.SendMessage(fHandle, WM_SETREDRAW, WPARAM(not Updating), 0);
|
||||||
|
if not Updating then
|
||||||
|
Windows.InvalidateRect(fHandle, nil, TRUE);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TWin32MemoStrings.Create(Handle: HWND; TheOwner: TWinControl);
|
constructor TWin32MemoStrings.Create(Handle: HWND; TheOwner: TWinControl);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|||||||
@ -729,6 +729,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;
|
||||||
procedure SetLines(const Value: TStrings);
|
procedure SetLines(const Value: TStrings);
|
||||||
|
procedure SetSelText(const Val: string); override;
|
||||||
procedure SetWantTabs(const NewWantTabs: boolean);
|
procedure SetWantTabs(const NewWantTabs: boolean);
|
||||||
procedure SetWordWrap(const Value: boolean);
|
procedure SetWordWrap(const Value: boolean);
|
||||||
procedure SetScrollBars(const Value: TScrollStyle);
|
procedure SetScrollBars(const Value: TScrollStyle);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user