QG_SetDragOptions
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 |
Configure drag+drop feedback 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 dragOptions 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 |
If dragOptions is set to 0, a plain, non-blinking dragging caret is used.
Parameter caretWidth specifies the width of the insertion caret in pixels.
Parameter caretColor specifies the color of the insertion caret using 4D's RGB color notation (0x00RRGGBB - see OBJECT 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 insertion caret will blink. The blinking interval is specified in ticks ( 60 ticks = 1 sec).
The following default drag options apply when this command is not called:
Drag options: | qg_UseBlinkingCaret | qg_UseDecoratedCaret |
Caret width: | 2 |
Caret color: | qg_SysHiliteColor |
Caret blinking interval: | 30 ticks |
Example
// Set the drag caret to 2 pixels thick, blue, decorated, fast blinking. C_LONGINT($err;$options;$caretThickness;$caretColor;$caretTime) $options:=qg_UseBlinkingCaret | qg_UseDecoratedCaret $caretThickness:=2 $caretColor:=0x00FF $caretTime:=10 $err:=QG_SetDragOptions (xGrid;$options;$caretThickness;$caretColor;$caretTime) ASSERT($err=qg_noErr)
Related commands
QG_GetDragOptions | Get the drag+drop feedback options for a QGrid area |