copy data between two TRichViewEdits

General TRichView support forum. Please post your questions here
Post Reply
dmitry_oz
Posts: 6
Joined: Wed Apr 30, 2008 2:33 am

copy data between two TRichViewEdits

Post by dmitry_oz »

Hi Sergey,

I tried to copy between two richviewedits but did not have much luck.

1) tried to use stream but second RichViewEdit2 was blank

stream := TMemoryStream.Create;
try
RichViewEdit1.SaveRVFToStream(stream, false);
stream.Position := 0;
RichViewEdit2.LoadRVFFromStream(stream);
RichViewEdit2.Format;
finally
stream.Free;
end;
2)RichView.assign won't work

Could you help please?
dmitry_oz
Posts: 6
Joined: Wed Apr 30, 2008 2:33 am

Ignore

Post by dmitry_oz »

Please ignore, it works just fine.
4stone
Posts: 4
Joined: Thu May 29, 2008 8:09 am

Post by 4stone »

richview2.AppendFrom(richview1);
richview1.format;
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

AppendFrom is the fastest way to copy data from one TRichView to another, but it does not support all item types, including controls and tables.
Post Reply