richmemo: saving fRTF on DestroyHandle event to follow LCL requirements about properties being available with/without window Handle
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5068 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
96eaa3a6f7
commit
35516cee58
@ -189,7 +189,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure DoSelectionChange;
|
procedure DoSelectionChange;
|
||||||
class procedure WSRegisterClass; override;
|
class procedure WSRegisterClass; override;
|
||||||
procedure CreateWnd; override;
|
procedure CreateWnd; override;
|
||||||
procedure UpdateRichMemo; virtual;
|
procedure UpdateRichMemo; virtual;
|
||||||
procedure SetHideSelection(AValue: Boolean);
|
procedure SetHideSelection(AValue: Boolean);
|
||||||
function GetContStyleLength(TextStart: Integer): Integer;
|
function GetContStyleLength(TextStart: Integer): Integer;
|
||||||
@ -272,6 +272,7 @@ type
|
|||||||
function GetRTF: string; virtual;
|
function GetRTF: string; virtual;
|
||||||
procedure SetRTF(const AValue: string); virtual;
|
procedure SetRTF(const AValue: string); virtual;
|
||||||
procedure UpdateRichMemo; override;
|
procedure UpdateRichMemo; override;
|
||||||
|
procedure DestroyHandle; override;
|
||||||
published
|
published
|
||||||
property Align;
|
property Align;
|
||||||
property Alignment;
|
property Alignment;
|
||||||
@ -573,6 +574,12 @@ begin
|
|||||||
if fRTF<>'' then SetRTF(fRTF);
|
if fRTF<>'' then SetRTF(fRTF);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRichMemo.DestroyHandle;
|
||||||
|
begin
|
||||||
|
fRTF:=GetRTF;
|
||||||
|
inherited DestroyHandle;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TCustomRichMemo }
|
{ TCustomRichMemo }
|
||||||
|
|
||||||
procedure TCustomRichMemo.SetHideSelection(AValue: Boolean);
|
procedure TCustomRichMemo.SetHideSelection(AValue: Boolean);
|
||||||
@ -634,7 +641,7 @@ begin
|
|||||||
UpdateRichMemo;
|
UpdateRichMemo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomRichMemo.UpdateRichMemo;
|
procedure TCustomRichMemo.UpdateRichMemo;
|
||||||
begin
|
begin
|
||||||
if not HandleAllocated then Exit;
|
if not HandleAllocated then Exit;
|
||||||
TWSCustomRichMemoClass(WidgetSetClass).SetHideSelection(Self, fHideSelection);
|
TWSCustomRichMemoClass(WidgetSetClass).SetHideSelection(Self, fHideSelection);
|
||||||
|
Loading…
Reference in New Issue
Block a user