ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Drag-and-drop operations managed automatically or set programmatically
  • Limitation
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
For certain field types, WINDEV and WEBDEV offer a manage drag-and-drop operations automatically: simply check the corresponding option in the "Detail" tab of the field description. A control can be defined as source or target of a drag-and-drop operation.
Automatic Drag and Drop is available:
  • WEBDEV - Server code for Upload, Static, Button, Link, Image, formatted text, List Box and Combo Box controls.
In a drag-and-drop operations set programmatically, the DndSource and DndTarget properties are used to define the Drag and Drop source and target controls.
The DndSource property determines how a control behaves in a drag-and-drop operation (Edit control, List Box, ListView, Looper, TreeView, etc.). This control will be set as the source object of the drag-and-drop operation.
Example
// -- Initialisation du champ LISTE_Source
// LISTE_Source n'est pas cible
LISTE_Source.DndSource = dndInactive

// -- Initialisation du champ LISTE_Cible
LISTE_Cible.DndCible = dndProgram
DnDEvent("Lâcher", "LISTE_Cible", dndDrop)
DnDEvent("Survol", "LISTE_Cible", dndDragOver)
Syntax

Finding out the behavior of a source control for Drag and Drop Hide the details

<Drag and Drop> = <Control used>.DndSource
<Drag and Drop>: Constant
Identifies the behavior of the source control for Drag and Drop:
dndAutoDrag-and-drop operations are handled automatically
dndInactiveDrag and Drop is disabled for this control
dndProgramThe developer sets the drag-and-drop operation programmatically
<Control used>: Control name
Name of the control to be used.

Modifying the behavior of a source control for Drag and Drop Hide the details

<Control used>.DndSource = <Drag and Drop>
<Control used>: Control name
Name of the control to be used.
<Drag and Drop>: Constant
Identifies the behavior of the source control for Drag and Drop.
dndAutoDrag-and-drop operations are handled automatically
dndInactiveDrag and Drop is disabled for this control
dndProgramThe developer sets the drag-and-drop operation programmatically
Remarks

Drag-and-drop operations managed automatically or set programmatically

WEBDEV - Server code An automation "Drag and Drop" is available for the following fields:
  • Upload control,
  • Static Text control,
  • Button control,
  • Link control,
  • Image control,
  • Formatted display control,
  • Edit control,
  • List Box control,
  • Combo Box control.
You can also programmatically set drag-and-drop operations on cells, supercontrols and control templates.

Limitation

WEBDEV - Server code The DndSource property can only be used with the following controls:
  • Edit control,
  • Button control,
  • Static Text control,
  • Link control,
  • Image control,
  • Formatted display control,
  • List Box control,
  • Combo Box control,
  • Cell control,
  • Supercontrol,
  • Control template.
  • Rich Text Area control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/10/2025

Send a report | Local help