trichview.com

trichview.support




Re: Copying part of the RichViewEdit to another


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/25/2004 22:57:15


> Select the part of first RichViewEdit and write this code:

>

>     MemStream := TMemoryStream.Create;

>     try

>       First_RichViewEdit.SaveRVFToStream(MemStream, True);

>       MemStream.Position := 0;

>       Second_RichViewEdit.LoadRVFFromStream(MemStream);

>     finally

>       MemStream.Free;

>     end;

>

> Note that properties of First_RichViewEdit and Second_RichViewEdit should

> be the same.


Some additional details:

- right click the source RichView and the destination RichView in Delphi,

choose "Settings" in the context menu. Make sure that the "Allow adding

styles dynamically" mode is set. In this case, not only document text, but

also all its formatting (styles) will be copied. Otherwise, both RichView

must be either linked to the same RVStyle or have compatible sets of styles.

- If in First_RichViewEdit there are some string tags (rvoTagsArePChars in

Options), in Second_RichViewEdit rvoTagsArePChars must be included in

Options too.





Powered by ABC Amber Outlook Express Converter