GridDropSel Event 195
Applies To: Grid

Description

If enabled, this event is reported when the user drag/drops a selected block of cells in the Grid. The default action is that the contents of the selected cells replace the values in the block of cells onto which they are dropped and this block now becomes selected.

You may disable the drag/drop facility entirely by setting the action code of the event to ¯1. You may also disable an individual drag/drop operation by returning 0 from a callback function.

The event message reported as the result of ⎕DQ, or supplied as the right argument to your callback function, is a 6-element vector as follows :

[1] Object ref or character vector
[2] Event 'GridDropSel' or 195
[3] Start 2-element integer vector containing the row, column address of the top left cell in the selected block
[4] Size 2-element integer vector containing the number of rows and columns in the selected block
[5] Target 2-element integer vector containing the row/column address of the top left cell onto which the selected block is being dropped
[6] Shift State sum of shift key codes (number)
1 = Shift key is down
2 = Ctrl key is down
[7] Undo flag 0 or 1
[8] Values Matrix containing the values of the selected block of cells. This is the data that will replace the values in the target cells.
[9] CellSet flags Boolean Matrix containing the values of the CellSet property for the selected block of cells. This will replace the values of the CellSet property of the target cells.

The shift state in element 6 is intended to allow the APL programmer to implement an insert operation instead of a copy or move operation if required.

You may copy the contents of one block of cells to another by calling GridDropSel as a method. If so, you need only specify the Start, Size and Target parameters. Note that the result block becomes selected.

The Undo flag is always 1 if the event was generated by the user.