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:
vincents 2007-04-19 10:16:35 +00:00
parent 3b5518415e
commit f73e81e3de
3 changed files with 19 additions and 0 deletions

View File

@ -162,6 +162,16 @@ begin
FLines.Assign(Value);
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);
------------------------------------------------------------------------------}

View File

@ -15,6 +15,7 @@ TWin32MemoStrings = class(TStrings)
function GetCount: integer; override;
function Get(Index : Integer) : string; override;
//procedure SetSorted(Val : boolean); virtual;
procedure SetUpdateState(Updating: Boolean); override;
public
constructor Create(Handle: HWND; TheOwner: TWinControl);
destructor Destroy; override;
@ -82,6 +83,13 @@ begin
Setlength(Result, len);
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);
begin
inherited Create;

View File

@ -729,6 +729,7 @@ type
procedure RealSetText(const Value: TCaption); override;
function GetCachedText(var CachedText: TCaption): boolean; override;
procedure SetLines(const Value: TStrings);
procedure SetSelText(const Val: string); override;
procedure SetWantTabs(const NewWantTabs: boolean);
procedure SetWordWrap(const Value: boolean);
procedure SetScrollBars(const Value: TScrollStyle);