<< Click to display table of contents >> TCustomRichViewEdit.InsertStringTag, InsertStringATag, InsertStringWTag |
The methods Insert text string s with associated Tag at the position of caret.
function InsertStringTag(const s: String;
const Tag: TRVTag): Boolean;
function InsertStringATag(const s: TRVAnsiString;
const Tag: TRVTag): Boolean;
function InsertStringWTag(const s: TRVUnicodeString;
const Tag: TRVTag): Boolean;
(introduced in version 1.6)
Inserted text (one text item) has the current text and current paragraph style.
Methods type: editing-style method for insertion.
Unlike InsertText:
▪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 these methods. Use InsertText when possible.
Unicode note:
Internally, text is stored as Unicode. InsertStringATag converts ANSI to Unicode using Style.DefCodePage.
InsertStringTag works:
▪like InsertStringATag, in Delphi 2007 and older
▪like InsertStringWTag, in Delphi 2009 and newer
▪with UTF-8 string, in Lazarus
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:
See also properties:
See also properties of TRVStyle:
See also:
▪Inserting items at position of caret;
▪Tags.