trichview.com

trichview.support




Re: Copy Selected text to other TRichViewEdit


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/24/2002 17:51:12


If you want to insert contents at the position of caret and want this

operation to be undone, use RichViewEdit1.InsertRVFFromStreamEd. In this

case, you need not to call Format.


If you do not want this operation to be undone, you can use either

AppendRVFFromStream or InsertRVFFromStream.

AppendRVFFromStream adds new items to the end of the document, and allows to

set a style of the first paragraph to the specified value (can be used to

append items to the end of the last paragraph).

InsertRVFFromStream can be used to append items to the end of the document

too, if you pass RichViewEdit1.ItemCount as Index parameter.

If you will use AppendRVFFromStream or InsertRVFFromStream, call

RichViewEdit1.ClearUndo before.


As for copying formatting, it highly depends on settings.

By default, formatting is not stored and not loaded to/from stream. It will

work good only if both editors are linked to the same RVStyle.

If not, do the following:

- at design time, right click RichViewEdit1, choose "Settings" in the

context menu, choose "Allow adding styles dynamically". Click OK.

- repeat the same actions with RichViewEdit2.

That's all, formatting will be copied.


> I ve another problem now. AppendRVFFromStream method ignores format and

> appends with given style.

> i want to add text with own format.






Powered by ABC Amber Outlook Express Converter