BBjGrid::setDragEnabled

Description

In BBj 8.00 and higher, this method sets whether the BBjGrid should allow drag operations.

Syntax

Return Value

Method

void

setDragEnabled(boolean mode)

Parameters

Variable

Description

mode

Specifies whether the BBjGrid should allow Drag and Drop operations.

0 = Drag Drop Disabled (Default).

1 = Drag Drop Enabled.

Return Value

None

Remarks

When drag-drop is disabled, all mouse press and drag movements will be considered a drag-select.  When drag-drop is enabled the in order for the user to perform a drag-drop motion on the grid, the user must press and hold the left mouse button on an already selected cell, row, or column.   The drag-drop feature will not work unless the cell had been previously selected.

Example

declare BBjSysGui sysgui!
declare BBjWindow win!
declare BBjStandardGrid grid!
sysgui!=BBjAPI().openSysGui("X0")
win!=sysgui!.addWindow(0,0,420,320,"Grid Test")
grid!=win!.addGrid(win!.getAvailableControlID(),10,10,400,300)

rem 'grid!.setEnhancedSelectionModelEnabled(1)
grid!.setMultipleSelection(1)

rem 'Default is false
rem 'grid!.setDragEnabled(0)
grid!.setDragEnabled(1)
print grid!.getDragEnabled()
grid!.setNumRows(10)
grid!.setNumColumns(5)
grid!.setRowHeight(32)
grid!.setDefaultColumnWidth(100)
process_events

See Also

BBjGridCell