rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.InsertStringTag, InsertStringWTag

Top  Previous  Next

The methods Insert text string s with associated Tag in the position of caret.

function InsertStringTag(const s: String; Tag: Integer): Boolean;

function InsertStringWTag(const s: WideString; Tag: Integer): Boolean;

(introduced in version 1.6)

Inserted text (one text item) has the current text and current paragraph style.

Methods type: editstyle editing-style method for insertion.

Unlike InsertText and InsertTextW,

s parameter must not contain CR, LF characters (#13 and #10) and page break character (#12);
TAB characters are always replaced with spaces, even if SpacesInTab=0.
the inserted string is not merged with surrounding text items, even if it has the same text style and tag.

Do not overuse this method. Use InsertText/InsertTextW when possible.

unicode Unicode note:

InsertStringTag: if the current text style is Unicode, s text will be converted to Unicode (conversion is based on charset of current text style).
InsertStringTagW: if the current text style is ANSI, s text will be converted to ANSI (conversion is based on charset of current text style).

 

Return value:

True if the insertion was successful (it can fail due to protection, or when inserting in table having multicell selection)

 

See also methods:

InsertText, InsertTextW.

See also properties:

CurParaStyleNo;
CurTextStyleNo.

See also properties of TRVStyle:

TextStyles;
ParaStyles;
SpacesInTab.

See also:

Inserting items in position of caret;
Tags.


RichView © Sergey Tkachenko