TCustomRichViewEdit.InsertRTFFromStreamEd

<< Click to display table of contents >>

TCustomRichViewEdit.InsertRTFFromStreamEd

Inserts RTF (Rich Text Format) from the Stream at the position of caret.

function InsertRTFFromStreamEd(Stream: TStream): Boolean;

(Introduced in version 1.5)

Parameters for loading are in TRichView.RTFReadProperties. The most important properties affecting RTF loading are RTFReadProperties.TextStyleMode and ParaStyleMode. The imported RTF may look absolutely different depending on values of these properties!  Setting for RTF loading can be changed in the TRichView component editor.

Method type: editstyle editing-style method for insertion.

If style templates are used, and RTFReadProperties.TextStyleMode=RTFReadProperties.ParaStyleMode=rvrsAddIfNeeded, and StyleTemplateInsertMode<>rvstimIgnoreSourceStyleTemplates, the method merges an RTF style sheet into Style.StyleTemplates, and reads text and paragraph styles according to StyleTemplateInsertMode. The method calls OnStyleTemplatesChange event.

 

Return value:

"successful insertion?" (extended information is in TRichView.RTFReadProperties.RTFErrorCode)

 

See also methods of TRichViewEdit:

InsertRTFFromFileEd;

PasteRTF.

See also methods of TRichView:

LoadRTFFromStream.

See also events of TRichView:

OnImportPicture;

OnReadHyperlink;

OnStyleTemplatesChange.

See also:

Saving and loading;

Inserting items at position of caret.