Copy contents of RichView

General TRichView support forum. Please post your questions here
Post Reply
Gerry
Posts: 4
Joined: Tue Aug 15, 2006 2:29 am

Copy contents of RichView

Post by Gerry »

Hi, I have a (hopefully simple) newbie question.

Is there a way to copy the contents of a TRichView or TRichViewEdit control into another?
Yernar Shambayev
Posts: 57
Joined: Wed Aug 31, 2005 6:46 pm

Post by Yernar Shambayev »

MemStream := TMemoryStream.Create;
try
rv.SaveRVFToStream(MemStream, False);
MemStream.Position := 0;
rv2.LoadRVFFromStream(MemStream);
finally
MemStream.Free;
end;
rv2.Format;
Gerry
Posts: 4
Joined: Tue Aug 15, 2006 2:29 am

Post by Gerry »

Yes, I was already doing it using memorystreams, I just thought there might be a more direct way. Thanks anyway! :)
Yernar Shambayev
Posts: 57
Joined: Wed Aug 31, 2005 6:46 pm

Post by Yernar Shambayev »

AppendFrom, but this method does not copy inserted controls and tables (just ignores them).
Post Reply