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

# TClipboard.SetSupportedFormats

SetSupportedFormats - set all supported formats at once

## Declaration

Source position: clipbrd.pp line 225

`public function TClipboard.SetSupportedFormats(`
`AFormatCount: Integer;`
`FormatList: PClipboardFormat`
`):Boolean;`

## Description

SetSupportedFormats - set all supported formats at once

All data will be empty.

This procedure is useful if setting the OnRequest event to put the data on the fly.

Example: Using the PrimarySelection from synedit.pp

    procedure TCustomSynEdit.AquirePrimarySelection;
          var
            FormatList: TClipboardFormat;
          begin
            if (not SelAvail)
            or (PrimarySelection.OnRequest=@PrimarySelectionRequest) then exit;
            FormatList:=CF_TEXT;
            PrimarySelection.SetSupportedFormats(1,@FormatList);
            PrimarySelection.OnRequest:=@PrimarySelectionRequest;
          end;

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