rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.PasteText, PasteTextW

Top  Previous  Next

These methods Insert text from the Clipboard in the position of caret

procedure PasteText;

procedure PasteTextA;

procedure PasteTextW;

PasteTextA pastes text in CF_TEXT format. PasteTextW pastes text in CF_UNICODETEXT.

In Windows 95/98/ME, CF_TEXT and CF_UNICODETEXT are independent Clipboard formats.

In Windows NT/2000/XP/Vista, Windows automatically converts them to each other, using the language of the keyboard layout that was used at the moment of copying.

These methods do nothing if the Clipboard does not contain ANSI/Unicode text.

Text is inserted in the position of caret, using the current text and paragraph styles.

Text from the Clipboard 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. PasteTextW supports the Unicode byte order marks characters (if it's present, it must be the first character).

Methods type: editstyle editing-style method for insertion.

unicode Unicode note:

PasteTextA: if the current text style is Unicode, text from the Clipboard will be converted to Unicode (conversion is based on the charset of the current text style).

PasteTextW: if the current text style is ANSI, text from the Clipboard will be converted to ANSI (conversion is based on the charset of the current text style).

PasteText works like PasteTextW in Delphi/C++Builder 2009+, and like PasteTextA in the older versions of Delphi/C++Builder.

See also methods:


InsertText, -A, -W.

See also properties:



See also properties of TRVStyle:




See also:

RichView and Clipboard.

TRichView © trichview.com