BBjGrid::setDragAccept
Description
Sets whether the BBjGrid will accept drag and drop operations.
Syntax
Return Value |
Method |
---|---|
void |
setDragAccept(boolean drag) |
Parameters
Variable |
Description |
drag |
Sets whether the grid will accept drag and drop operations. 0 = No drag and drop operation 1 = Drag and drop operation |
Return Value
None.
Remarks
If drag and drop operation is set ON, the user can click on a cell and drag to another cell and release, copying the contents from the first cell into the second cell. The grid handles drag and drop operations if this option is set. By default, drag and drop operations are not allowed.
setDragAccept(1) causes the following behavior:
1. |
If the user begins a drag gesture while cursor is on the grid, BBj fires a BBjGridMouseDragEvent and displays the drag cursor. |
2. |
In 4.03- If the user is executing a drag gesture and releases the mouse button while over the grid, then BBj fires a BBjGridMouseUpEvent rather than a BBjGridDragDropEvent. The grid does not accept the dragged item and the content of the grid does not change. |
|
In BBj 6.0and higher - If the user is executing a drag gesture and releases the mouse button while over the grid, then BBj will accept the dragged item and fires a BBjGridDragDropEvent rather than a BBjGridMouseUpEvent. If the dragged item is a string, the content of the grid will be changed. |
When setDragAccept(1)
is specified, drag/drop actions will always be allowed, even if the grid is not otherwise editable. The BBjGridDragDropEvent can be used to selectively accept or reject drag/drop actions, as shown in the example program.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.