Help Center

Clipproperty

Returns or sets the contents of the cells in the MSHFlexGrid's selected region.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY Clip () AS DWSTRING
PROPERTY Clip (BYREF wszClip AS WSTRING)

Parameters

NameDescription
wszClipOne of the constants listed below.

Description

Returns or sets the contents of the cells in the MSHFlexGrid's selected region.

Remarks

It allows you to get or set the contents of a selected range of cells using a single string.

The Clip property operates exclusively on the current selection, defined by the Row, Col, RowSel, and ColSel properties.

By default, tab characters (CHR(9)) indicate column breaks, and carriage returns (CHR(13)) indicate row breaks.

Clip is significantly faster than using TextMatrix in a loop because it minimizes the number of individual property calls.

A critical use case for legacy maintenance is overcoming a bug where bound MSHFlexGrids only display the first 2,048 rows. By using the GetString method of an ADO Recordset, you can transfer thousands of rows into the grid instantly:

Clipboard interaction: It is the standard property for implementing Copy and Paste functionality. You can move data to the system clipboard by simply assigning Clip to Clipboard.SetText.

Example

' Example: Populating a grid with 5,000 rows grid.Rows = 5000 grid.Col = 0: grid.Row = 1 grid.ColSel = 5: grid.RowSel = 4999 grid.Clip = rs.GetString(adClipString)

Reference