Page 1 of 1

Fastest way to clone data of one RVE to another?

Posted: Tue Oct 11, 2011 8:28 pm
by blsstdok
I have two richviewedits. I want to clone the content of one to the other, including styles, etc, but do not want them to *share* anything (no common pointers/classes/etc).

What is the fastest way to do this, ideally avoiding any formatting?

Re: Fastest way to clone data of one RVE to another?

Posted: Wed Oct 12, 2011 3:47 pm
by blsstdok
blsstdok wrote:What is the fastest way to do this, ideally avoiding any formatting?
I should add that the two controls will have the same sizes, so formatting shouldn't be necessary when the data is cloned.

Posted: Wed Oct 12, 2011 5:31 pm
by Sergey Tkachenko
You can copy a document, but you cannot copy formatting (we are considering to implement saving and loading of formatting info, but in the current version it is not implemented). So, after copying, you'll need to format the target RichView. And it will be the slowest part.

As for copying, it is SaveRVFToStream and LoadRVFFromStream. This is the only method for copying all the content.
If your documents are simple (contain only text and images), you can use AppendFrom.