External Program Interfaces : System Clipboard : CLIPBOARD system handle
CLIPBOARD system handle
The CLIPBOARD system handle allows you to transfer data between the window system clipboard and your OpenEdge application. Using the CLIPBOARD attributes, you can paste (read) data from the system clipboard to an ABL field or variable, and copy or cut (write) data from a field or variable to the clipboard. These cut, copy, and paste data transfers are the basic clipboard operations typically provided by the system clipboard to the user.
In ABL, you also have a choice of two data transfer modes to implement these operations—single-item transfers and multiple-item transfers. In single-item transfers, a single write to the clipboard immediately replaces all data in the clipboard, and a single read from the clipboard returns all data in the clipboard to the OpenEdge application. In multiple-item transfers, you can format the data transfer into multiple rows of multiple items. Each write to the clipboard adds an item to a tab- and newline-separated list of clipboard items; each read from the clipboard returns one tab- or newline-separated item to your OpenEdge application. This mode is especially useful to allow users to transfer aggregate units of data, in one step, between OpenEdge and other applications (such as spreadsheets) that also support aggregate clipboard operations in a similar way.
These data transfers are accomplished with the help of the CLIPBOARD handle attributes listed in the following table.
Table 49. CLIPBOARD handle attributes
Attribute
Type
Readable
Setable
AVAILABLE-FORMATS
CHARACTER
–
ITEMS-PER-ROW
INTEGER
MULTIPLE
LOGICAL
NUM-FORMATS
INTEGER
–
TYPE
CHARACTER
–
VALUE
CHARACTER
The following sections provide an overview of the CLIPBOARD handle attributes. For a complete description of the CLIPBOARD handle and its attributes, see the CLIPBOARD Handle reference entry in OpenEdge Development: ABL Reference.