External Program Interfaces : System Clipboard : Multiple-item data transfers
Multiple-item data transfers
Each multiple-item data transfer moves data between one or more ABL data items and the clipboard. During a paste operation, all data stored in the clipboard is transferred to the data items. During a cut or copy operation, the values of the selected ABL data items replace any and all data in the clipboard.
Multiple-item clipboard operations are typically invoked by Cut, Copy, and Paste options on an Edit menu, just like single-item operations. There are two basic techniques you can use to implement multiple transfers in a procedure:
Widget-based transfers — Provide a selection mode that allows the user to select eligible widgets for the selected clipboard operation. After the user selects and confirms the widgets that are valid for the operation, the operation proceeds.
Data-based transfers — Provide options to transfer data directly between the OpenEdge database and the clipboard. This is the most common type of multiple-item data transfer.
To implement any multiple-item data transfer:
1. Determine the clipboard operation to perform and the data items to participate in the operation.
2. Set the CLIPBOARD handle MULTIPLE attribute to TRUE. For Cut/Copy (write) operations, set the ITEMS-PER-ROW attribute to the number of items in each line of data written to the clipboard.
3. For each data item, assign the appropriate data item value (screen or record buffer) to the VALUE attribute for Cut/Copy operations or assign the VALUE attribute to the data item for Paste (read) operations.
4. Set the MULTIPLE attribute to FALSE to complete the operation. This resets the item pointer to the beginning of the clipboard for a Cut/Copy operation and writes the item-formatted data to the clipboard for a Paste operation. (This also resets the ITEMS-PER-ROW attribute.)