QGrid
![]() |
![]() |
QG_SetDragOptions(areaRef; dragOptions; caretWidth; caretColor; caretTime):errorCode | |||
![]() |
areaRef | Longint | QGrid area reference |
![]() |
dragOptions | Longint | Drag and drop option flags |
![]() |
caretWidth | Longint | Drop caret width |
![]() |
caretColor | Longint | Drop caret color |
![]() |
caretTime | Longint | Drop caret blinking interval |
![]() |
error | Longint | Error result |
Configures drag'n'drop options for a QGrid plug-in area.
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
Parameter dragOptions is the combination of various drag'n'drop flags. It is constructed by combining (with addition or bitwise "or") any of the following constants:
qg_UseBlinkingCaret | 0x00000002 | Use blinking caret |
qg_UseDecoratedCaret | 0x00000004 | Caret has decorated ends |
qg_UseCaretPattern | 0x00000008 | Draw non-solid caret |
Parameter caretWidth specifies the width of the drag'n'drop insertion caret in pixels.
Parameter caretColor specifies the color of the drag'n'drop insertion caret using 4D's RGB color notation (0x00RRGGBB - see SET RGB COLORS in 4D's documentation). It can also take the predefined value qg_SysHiliteColor, forcing the caret color to be the system highlight color.
Parameter caretTime specifies how fast the drag'n'drop insertion caret will blink. The blinking interval is specified in ticks (1 tick = 1/60th of the second).
Note
If the QG_SetDragOptions method is not called for a QGrid area, the plug-in uses the following defaults:
Drag options: | qg_UseBlinkingCaret + qg_UseDecoratedCaret |
Caret width: | 2 |
Caret color: | qg_SysHiliteColor |
Caret blinking interval: | 30 ticks |
Example
C_LONGINT($err;$options;$caretWidth;$caretColor;$caretTime) $options:=qg_UseBlinkingCaret +qg_UseDecoratedCaret $caretWidth:=2 $caretColor:=0x00220077 $caretTime:=20 $err:=QG_SetDragOptions (xGrid;$options;$caretWidth;$caretColor;$caretTime) If ($err # qg_noErr) ` Handle the error End if |
Related commands
QG_GetDragOptions | Returns the current drag'n'drop options for a QGrid plug-in area |