Skip to main content

TdxSpreadSheetPasteSelection Class

An action object that corresponds to the PasteSelection command provided by the Spreadsheet and Report Designer controls.

Declaration

TdxSpreadSheetPasteSelection = class(
    TdxSpreadSheetAction
)

Remarks

This class does not introduce any new public members. Executing a TdxSpreadSheetPasteSelection action leads to different results depending on the current selection within the active Table View worksheet and the clipboard state:

  • If an in-place editor is open and the clipboard contains either a string or numeric value, executing the action object pastes the clipboard content at the current caret position.
  • If an in-place editor is open and the clipboard contains either a cell or cell range, executing the action object has no effect.
  • If an in-place editor is closed and the clipboard contains a value, cell, or cell range, executing the TdxSpreadSheetPasteSelection action object pastes the clipoard content into the active worksheet. You can use this action object to paste a cell range into the multiple identical selections whose dimensions match those of the cell range within the clipboard. Otherwise, a EdxSpreadSheetError is raised.

UI elements linked to a TdxSpreadSheetPasteSelection action object are enabled only if one of the following conditions is met:

  • The clipboard paste operation is allowed in the active worksheet (i.e., its CanPasteFromClipboard function returns True).
  • An in-place cell editor is active (the active worksheet’s IsEditing property returns True).

Note

CopySelection and CutSelection commands are implemented as TdxSpreadSheetCopySelection and TdxSpreadSheetCutSelection objects.

See Also