ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Drag and drop functions
  • Variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Indicates the procedure to run during an event of Drag/Drop.
Note: To programmatically manage the behavior of a field during a drag/drop, use the properties DndTarget and DndSource with the constant dndProgrammed.
// Appel de la procédure SurLâcher lorsque le bouton gauche 
// de la souris est relâché sur le champ cible "SAI_Rechercher"
DnDEvent("SurLâcher", SAI_Rechercher, dndDrop)
Syntax
DnDEvent(<Procedure> , <Control name> , <Type of event>)
<Procedure>: Character string
Name of the procedure that must be called during the <Type of event> event on the <Control name> control.
<Control name>: Character string
Name of the control on which the event must be processed.
<Type of event>: Constant
Type of event triggering the call to <Procedure>:
dndBeginDragInitiates the drag-and-drop operation.
dndDragEnterEnters a drop target.
dndDragLeaveLeaves a drop target.
dndDragOverHovers over a drop target.
dndDropDrops an element on a drop target.
dndEndDragEnds the drag-and-drop operation.
Remarks

Variables

The following variables can be used:
Variable nameDescription
_DND.ActionAction specified in DnDAccept.
The various possible values are as follows: dndCopy, dndMove and dndProhibited.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant).
_DND.TargetControlName of the target control.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant).
_DND.SourceControlName of source control.
_DND.CtrlDownStatus of Ctrl key:
  • True: the Ctrl control key is pressed.
  • False: the Ctrl control key is not pressed.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant).
_DND.SourceWinName of source window.
This variable is not filled when exiting from a target control (dndDragLeave constant).
_DND.MouseXPosHorizontal position (X) of mouse cursor in relation to the control handled during the event.
This variable is not filled when exiting from a target control (dndDragLeave constant).
_DND.MouseYPosVertical position (Y) of mouse cursor in relation to the control handled during the event.
This variable is not filled when exiting from a target control (dndDragLeave constant).

The _DND.SourceControl and _DND.SourceWin variables return an empty string ("") when the Drag and Drop comes from an application other than the current application.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help