BBjGrid::getDragEnabled

Description

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

Syntax

Return Value

Method

void

getDragEnabled()

Parameters

None

Return Value

Returns 1 if the grid will perform drag-drop on currently selected cells, otherwise returns a 0. The default is false.

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