LCL, win32: TMemo: remove Lines.BeginUpdate/EndUpdate for win32 for Delphi compatibility

git-svn-id: trunk@53888 -
This commit is contained in:
ondrej 2017-01-06 11:03:11 +00:00
parent 98625cfd74
commit 5f5df812af
4 changed files with 19 additions and 11 deletions

View File

@ -206,16 +206,6 @@ 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);
begin
if Value <> FScrollbars then begin

View File

@ -202,6 +202,7 @@ type
class procedure SetScrollbars(const ACustomMemo: TCustomMemo; const NewScrollbars: TScrollStyle); override;
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); override;
class procedure ScrollBy(const AWinControl: TWinControl; DeltaX, DeltaY: integer); override;
class procedure SetSelText(const ACustomEdit: TCustomEdit; const NewSelText: string); override;
end;
{ TWin32WSEdit }
@ -1472,6 +1473,12 @@ begin
RecreateWnd(ACustomMemo);
end;
class procedure TWin32WSCustomMemo.SetSelText(const ACustomEdit: TCustomEdit;
const NewSelText: string);
begin
TWin32WSCustomEdit.SetSelText(ACustomEdit, NewSelText);
end;
class procedure TWin32WSCustomMemo.SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean);
begin
// TODO: check if can be done without recreation

View File

@ -855,7 +855,6 @@ type
procedure KeyUpAfterInterface(var Key: Word; Shift: TShiftState); override;
procedure SetCaretPos(const Value: TPoint); override;
procedure SetLines(const Value: TStrings);
procedure SetSelText(const Val: string); override;
procedure SetWantReturns(const AValue: Boolean);
procedure SetWantTabs(const NewWantTabs: boolean);
procedure SetWordWrap(const Value: boolean);

View File

@ -181,6 +181,7 @@ type
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); virtual;
class procedure SetWantReturns(const ACustomMemo: TCustomMemo; const NewWantReturns: boolean); virtual;
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); virtual;
class procedure SetSelText(const ACustomEdit: TCustomEdit; const NewSelText: string); override;
end;
TWSCustomMemoClass = class of TWSCustomMemo;
@ -649,6 +650,17 @@ class procedure TWSCustomMemo.SetScrollbars(const ACustomMemo: TCustomMemo; cons
begin
end;
class procedure TWSCustomMemo.SetSelText(const ACustomEdit: TCustomEdit;
const NewSelText: string);
begin
TCustomMemo(ACustomEdit).Lines.BeginUpdate;
try
TWSCustomEdit.SetSelText(ACustomEdit, NewSelText);
finally
TCustomMemo(ACustomEdit).Lines.EndUpdate;
end;
end;
class procedure TWSCustomMemo.SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean);
begin
end;