Skip to main content

TdxSpreadSheetTableView.CanPasteFromClipboard(TdxSpreadSheetClipboardPasteOptions) Method

Identifies if it is possible to insert the clipboard’s content to the worksheet.

Declaration

function CanPasteFromClipboard(AOptions: TdxSpreadSheetClipboardPasteOptions): Boolean; overload; virtual;

Parameters

Name Type
AOptions TdxSpreadSheetClipboardPasteOptions

Returns

Type
Boolean

Remarks

Both overloaded function variants return True if it is possible to paste the clipboard’s content to cells; otherwise – False. Either function variant returns True only if the following conditions are met:

  • There is no active in-place cell editor (that is, the IsEditing property returns False);

  • The Spreadsheet control’s OptionsBehavior.Editing property is set to True;

  • The clipboard content is valid (that is, contains cell information that corresponds to at least one paste special flag).

The first overloaded CanPasteFromClipboard function variant accepts no parameters and checks if it is possible to paste the clipboard content with the default paste settings. The second variant accepts a custom set of paste special flags as the AOptions parameter. Refer to the TdxSpreadSheetClipboardPasteOption type description for detailed information on individual paste special flags.

A PasteFromClipboard procedure call has no effect if the CanPasteFromClipboard function returns False.

See Also