QG_GetSelectionOptions
QG_GetSelectionOptions(areaRef; selectionFlags; frameColor; frameWidth):errorCode | |||
---|---|---|---|
![]() |
areaRef | Longint | QGrid area reference |
![]() |
selectionFlags | Longint | Selection method |
![]() |
frameColor | Longint | Color of selection frame |
![]() |
frameWidth | Longint | Width of selection frame |
![]() |
error | Longint | Error result |
Get the user selection options for a QGrid area
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
Parameter selectionFlags receives the user selection options. QGrid defines the following constants for selectionFlags:
qg_SelectionNotAllowed | 1 | No user selection is allowed |
qg_SelectOneCell | 2 | Only single cell selection is allowed (default) |
qg_SelectManyCells | 6 | Multiple cell selection is allowed |
Parameter frameColor receives the color used for highlighting (framing) the user-selected cells, expressed in 4D's RGB color notation (0x00RRGGBB - see OBJECT SET RGB COLORS in 4D's documentation).
Parameter frameWidth receives the frame width in pixels.
Example
// Change the area to single-cell selection mode. C_LONGINT($err) C_LONGINT($selectionFlags;$frameColor;$frameThicknes) $err:=QG_GetSelectionOptions (xGrid;$selectionFlags;$frameColor;$frameThicknes) ASSERT($err=qg_noErr) $err:=QG_SetSelectionOptions (xGrid;qg_SelectOneCell;$frameColor;$frameThicknes) ASSERT($err=qg_noErr)
Related commands
QG_SetSelectionOptions | Set the user selection options for a QGrid area |