QDrop
![]() |
![]() ![]() |
QD_SetDropHandler(areaRef; dropHandler):error | |||
![]() |
areaRef | Longint | Area reference |
![]() |
dropHandler | String31 | Drop handler method |
![]() |
error | Longint | Error result |
Specifies the drop handler method for a QDrop plug-in area.
Parameter areaRef is the reference to the plug-in area.
Parameter dropHandler is the name of the handler method. The drop handler method must match the following calling interface:
Structure of the Drop Handler Method
A drop handler method must comply with the following calling interface:
DropHandlerMethod(dropArea(L))-> $1 dropArea Longint Area reference
In your drop handler you can get information about the dropped items by calling QD_CountDroppedFiles and QD_GetDroppedFile.
Example
C_LONGINT($error) $error:=QD_SetDropHandler (xDrop;"X_DROP_HANDLER") ================================================== ` Sample drop handler method X_DROP_HANDLER C_LONGINT($1;$area) $area:=$1 C_LONGINT($error;$numFiles;$ii) C_TEXT($filePath) $error:=QD_CountDroppedFiles ($area;$numFiles) For ($ii;1;$numFiles) $error:=QD_GetDroppedFile ($area;$ii;$filePath) If ($error=0) ALERT($filePath) Else ALERT("Error "+String($error)) End if End for |
Related commands
QD_GetDropHandler | Returns the drop handler method of a QDrop plug-in area |