TCustomRichView.CopyDef

<< Click to display table of contents >>

TCustomRichView.CopyDef

Copies the selected fragment to the Clipboard in several formats according to Options.

function CopyDef: Boolean;

This is the main method for copying to the Clipboard. It is executed automatically when user presses  Ctrl + C  or  Ctrl + Insert .

On Windows, calling CopyDef does the same thing as sending WM_COPY message to the control.

This procedure does nothing if there is nothing selected.

This procedure clears the Clipboard before copying.

This method must be called only when the document is formatted.

 

Copying [VCL; Lazarus; FMX for Windows, macOS, and Linux]

The selected fragment is copied to the Clipboard in multiple formats.

if (rvoAutoCopyRVF in Options), it copies selection as RVF.

if (rvoAutoCopyImage in Options), and there is only one picture selected, it copies selection as an image.

if (rvoAutoCopyUnicodeText in Options), it copies text as Unicode text.

if (rvoAutoCopyRTF in Options), it copies selection as RTF.

 

Copying [FMX for Android and iOS]

The selected fragment is copied to the Clipboard in the most appropriate format.

if (rvoAutoCopyImage in Options), and there is only one picture selected, it copies selection as an image; otherwise

if (rvoAutoCopyRVF in Options), it copies selection as RVF; otherwise

if (rvoAutoCopyRTF in Options), it copies selection as RTF; otherwise

if (rvoAutoCopyUnicodeText in Options), it copies text as Unicode text.

 

Return value:

"Is the selection not empty?" and "Is at least one of rvoAutoCopy*** options set?"

See also:

Working with selection;

Working with Clipboard.