[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'StdCtrls' (#lcl)

# TCustomEdit.PasteFromClipboard

Inserts text from the clipboard at the current position in the control.

## Declaration

Source position: stdctrls.pp line 849

`public procedure TCustomEdit.PasteFromClipboard; virtual;`

## Description

PasteFromClipboard is a method used to insert the contents of the clipboard at the current position in the edit control. If Text is selected in the control, the SelText is replaced with the clipboard content. When SelLength is 0, the clipboard values are inserted at the position for the editing cursor.

PasteFromClipboard is performed when the Ctrl+V or Shift+Insert key combination is handled for the control (macOS uses Meta+V or Shift+Insert).

PasteFromClipboard calls the Paste method in the widgetset class when its handle has been allocated.

Use CopyToClipboard to copy the current text selection in the control to the clipboard.

Use CutToClipboard to copy the selected text to the clipboard, and delete it from the text in the edit control.

Use Undo to revert the last editing action performed in the control.