[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomStringGrid.CopyToClipboard

Copies the current Selection range to the clipboard.

Declaration

Source position: grids.pas line 1808

public procedure TCustomStringGrid.CopyToClipboard(

  AUseSelection: Boolean = False

);

Description

CopyToClipboard will copy a range of cells into the clipboard. The cell values are stored in a Tab-delimited format. The cell selection range is based on the optional AUseSelection parameter (which is False by default) and indicates the range is set to the whole grid, including fixed columns and rows. If AUseSelection is True, the range of cells is set to the current values in the TCustomGrid.Selection property.

Remark: TCustomStringGrid provides run-time support for pasting cell values from the clipboard, but is limited to a single selection range. Pasting multi-selections is problematic since the ranges can represent non-adjacent cell areas. For this reason, a PasteFromClipboard method is not implemented in TCustomStringGrid. No actions are performed when Ctrl+V is pressed and HasMultiSelection returns True.

See also

TCustomGrid.Selection

  

Rectangle with the current cell selections in the grid control.

TCustomStringGrid.DoPasteFromClipboard

  

Pastes data from the clipboard into the grid control.

TCustomGrid.HasMultiSelection

  

Indicates if multi-select range selection mode is enabled and in use for the grid.


Version 3.2 Generated 2024-02-25 Home