QGrid
![]() |
![]() ![]() |
QG_SetSelectionOptions(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 |
Sets 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 specifies 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 specifies the color used for highlighting (framing) the user-selected cells, and it must be expressed in 4D's RGB color notation (0x00RRGGBB - see SET RGB COLORS in 4D's documentation).
Parameter frameWidth specifies the frame width in pixels.
Note:
If the QG_SetSelectionOptions method is not called for a QGrid area, the plug-in sets the selection options to the following defaults:
User selection option: | qg_SelectOneCell |
Frame color: | 0x00FF0000 (RGB Red) |
Frame width: | 2 pixels |
Example
C_LONGINT($err;$option;$color;$width) $option:=qg_SelectManyCells ` allow multiple cell selection $color:=0x00FF8844 $width:=2 $err:=QG_SetSelectionOptions(xGrid;$option;$color;$width) If ($err # qg_noErr) ` Handle the error End if |
Related commands
QG_GetSelectionOptions | Returns the user selection options for a QGrid area |