General TRichView support forum. Please post your questions here
-
Gerry
- Posts: 4
- Joined: Tue Aug 15, 2006 2:29 am
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).