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

# TClipboard

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TClipboard - area for holding information that has been cut or copied, ready for pasting

## Declaration

Source position: clipbrd.pp line 155

`type TClipboard = class(TPersistent)`
`public`
`function AddFormat();` |  |
`procedure Assign(); override;`
`procedure AssignTo(); override;`
`procedure Clear;` |  | Clear the clipboard
`procedure Close;` |  | Close down the clipboard
`procedure Create();` |  |
`destructor Destroy; override;`
`function FindPictureFormatID;` |  | FindPictureFormatID - search for the first format ID that is a graphic
`function FindFormatID();` |  | FindFormatID - find a Format ID that has the specified name
`function GetComponent();` |  | GetComponent - read a component from the clipboard
`procedure GetComponentAsText();` |  | GetComponentAsText - read the component as text, if supported
`function GetFormat();` |  | GetFormat - read information on format from the clipboard
`procedure SupportedFormats();` |  |
`function GetTextBuf();` |  | GetTextBuf - reads text from the clipboard and returns the number of characters
`function HasFormat();` |  | HasFormat - look up the list to see if the format is supported. If a TPicture format is specified, all graphic formats are searched.
`function HasFormatName();` |  | HasFormatName - checks if data have format with specified name
`function HasPictureFormat;` |  | HasPictureFormat - checks whether data are formatted as a picture
`procedure Open;` |  | Open the clipboard to receive and transmit data
`function SetComponent();` |  | Write specified component to the Clipboard
`function SetComponentAsText();`
`function SetFormat();` |  |
`function SetSupportedFormats();` |  | SetSupportedFormats - set all supported formats at once
`procedure SetTextBuf();` |  |
`property AsText: String; [rw]` |  | AsText - holds the textual data in the clipboard as a string
`property ClipboardType: TClipboardType; [r]` |  | ClipboardType - ctPrimarySelection, ctSecondarySelection, ctClipboard
`property FormatCount: Integer; [r]` |  | FormatCount - the number of formats available
`property Formats: TClipboardFormat; [r]` |  | Formats - the formats being used in the current clipboard
`property OnRequest: TClipboardRequestEvent; [rw]` |  | OnRequest - event handler for a request for clipboard data
`end;`

## Inheritance

`TClipboard` |  | TClipboard - area for holding information that has been cut or copied, ready for pasting
`TPersistent`
`TObject`

## Description

TClipboard - area for holding information that has been cut or copied, ready for pasting

The clipboard object encapsulates the Windows clipboard and the three standard Gtk selections. For each of the three clipboards/selections there is an object: PrimarySelection, SecondarySelection and Clipboard. There is no difference between the three objects except their type.

A lot of information about Clipboard Formats, including pre-defined formats for Delphi/Kylix compatibility, is found in the LCLType unit, at TClipboardFormat, TClipboardType, ClipboardTypeName, TPredefinedClipboardFormat, PredefinedClipboardMimeTypes

## See also

TClipboardFormat |  |
TClipboardType |  |
ClipboardTypeName |  |
TPredefinedClipboardFormat |  |
PredefinedClipboardMimeTypes |  |

The latest version of this document can be found at lazarus-ccr.sourceforge.net.