How to save load RV Control State ?
Posted: Sat Feb 07, 2015 12:10 pm
I'm using TabControl in my app and every time when tab is changed i need to save and load RV content.
I can save RV content in to the stream but
how can i save and restore RV states like caret pos, selected text, scrolling pos and etc.. ?
I tried to use this but it won't work
I can save RV content in to the stream but
how can i save and restore RV states like caret pos, selected text, scrolling pos and etc.. ?
I tried to use this but it won't work
Code: Select all
procedure TForm1.cxButton1Click(Sender: TObject);
var Str: TMemoryStream;
begin
RegisterClass( TcxTRichViewEdit ) ;
RegisterClass( TcxInnerTRichViewEdit ) ;
// TcxInnerTRichViewEdit
Str:= TMemoryStream.Create;
Str.WriteComponent( cxTRichViewEdit1 );
Str.Position := 0;
cxTRichViewEdit1 := Str.ReadComponent(nil) as TcxTRichViewEdit;
Str.Free;
end;