TXTextControl.TXTextControl.Paste Method

Replaces the current selection in the Text Control with the contents of the Clipboard. Only data provided in the specified format is inserted. This method can be used to change the default behaviour, if the clipboard contains the data in more than one format. By default, TXTextControl inserts data from the clipboard in the following order: textframe, formatted image, formatted text (TXTextControl format), formatted text (RTF format), formatted text (HTML format), plain text, image, OLE object.

Introduced: 21.0.

Syntax

TXTextControl.Paste Format
Parameter Description
Format

Specifies the format to insert. It must be one of the values contained in the array returned through the ClipboardFormats property. It can be one of the following Values:


Value Description
TXTextControlFormat (2) Specifies formatted text in the internal TX Text Control format.
RichTextFormat (3) Specifies RTF format (Rich Text Format).
Image (4) Specifies an image. An image can be pasted, if it is a device dependent or a device independent bitmap, a TIFF image or a Windows metafile.
PlainText (5) Specifies unformatted text.
OLEObject (6) Specifies an OLE object.
TXTextControlTextframe (7) Specifies a TX Text Control textframe including its contents. The clipbord contains also information about how the textframe is positioned in the document (inline or geometrically positioned).
TXTextControlImage (8) Specifies an image including information about how the image is positioned in the document (inline or geometrically positioned).
HTMLFormat (9) Specifies HTML format (Hypertext Markup Language).

Return Value

The return value is true, if something has been pasted. Otherwise, it is false.

Data Types

Format: Integer
Return value: Boolean

See Also