|
TCustomRichViewEdit.InsertText, InsertTextA, InsertTextW |
Top Previous Next |
|
The methods insert text in the position of caret. procedure InsertText(const text: String; CaretBefore: Boolean=False); procedure InsertTextA(const text: TRVAnsiString; CaretBefore: Boolean=False); procedure InsertTextW(const text: TRVUnicodeString; CaretBefore: Boolean=False); Inserted text has current text and current paragraph style. Text may contain special characters:CR, LF, TAB, FF (#13, #10, #9, #12). #9 characters may be inserted as tabulators, depending on value of SpacesInTab property of the linked RVStyle component. #12 characters add page breaks. All possible line breaks modes (CR, LF, CR+LF, LF+CR) are supported. InsertTextW supports the Unicode byte order marks characters (if it's present, it must be the first character in text). If CaretBefore=True, the caret will be positioned before the inserted text after insertion (default positioning is after the text). Set it to True when performing search-and-replace in down-up direction (note: the standard replace dialog does not allow to choose down-up direction) to avoid infinite loop (when replacing, for example, 'a' with 'aa'). The "smart start" search option helps to solve this problem; however, this advice is still in effect. Methods type:
▪InsertTextA: if the current text style is Unicode, text will be converted to Unicode (conversion is based on the charset of the current text style). ▪InsertTextW: if the current text style is ANSI, text will be converted to ANSI (conversion is based on the charset of the current text style). ▪InsertText works like InsertTextW in Delphi/C++Builder 2009+, and like InsertTextA in older versions of Delphi/C++Builder.
See also methods: ▪InsertStringTag, InsertStringATag, InsertStringWTag. See also properties: See also properties of TRVStyle: See also: |