Sign in Join
FPDoc Onlineexperiment

TClipboard.GetFormat function

Member of TClipboardpublicIn unit Clipbrd

Gets the data for the specified clipboard format from the LCL interface or cached clipboard data.

Declaration

pascal
function GetFormat(FormatID: TClipboardFormat; Stream: TStream)
: Boolean

Arguments

FormatID

Format ID for the requested clipboard data.

Stream

TStream instance where the data for the format is stored.

Function result

Returns True if data for the format is available, or False when not found.

Description

GetFormat is a Boolean function used to retrieve clipboard data for the specified format into the specified stream. It uses cached clipboard data when available, or calls ClipboardGetData in the LCL interface to retrieve the data for the ClipboardType.

The return value is True for the following conditions:

  • Cached data is available and an assigned OnRequest handler was signalled to get the data for the specified format identifier.
  • Cached data is available and used to load the content in the Stream argument.
  • ClipboardGetData indicates that data has been returned in Stream from the LCL interface.

GetFormat is used in the implementation of methods like GetComponent, GetTextBuf, and GetAsHtml. It is also called when reading the value for the AsText property.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.