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
  • Drag-and-drop operations managed automatically or set programmatically
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures

Drag and Drop

Some controls of WINDEV and WEBDEV can manage drag-and-drop operations automatically: simply check the corresponding option in the "Details" tab of the control description. A control can be defined as source or target of a drag-and-drop operation.
Drag-and-drop operations are automatically available:
  • WINDEV for Edit, List Box, ListView and TreeView controls.
    New in version 2024
    automatic Drag and Drop is also available for edit control "Text tokens"..
In a drag-and-drop operations set programmatically, the DndSource and DndTarget properties are used to define the source and target controls.
The DndTarget property determines and changes how a control behaves in a drag-and-drop operation. The control will be defined as the drop target, i.e., the control where the dragged items will be dropped.
Example
WINDEV
// -- Initialisation de la liste LISTE_Source
// LISTE_Source n'est pas cible
LISTE_Source.DndCible = dndInactive

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

Getting the behavior of a target control in a drag-and-drop operation Hide the details

<Drag and Drop> = <Control used>.DndTarget
<Drag and Drop>: Constant
Identifies the behavior of the target control in a drag-and-drop operation.
dndAutoDrag-and-drop operations are handled automatically.
dndInactiveThe control does not accept drag-and-drop operations.
dndProgramThe developer sets the drag-and-drop operation programmatically.
<Control used>: Control name
Name of the control to be used.

Changing the behavior of a target control in a drag-and-drop operation Hide the details

<Control used>.DndTarget = <Drag and Drop>
<Control used>: Control name
Name of the control to be used.
<Drag and Drop>: Constant
Identifies the behavior of the target control in a drag-and-drop operation.
dndAutoDrag-and-drop operations are handled automatically.
dndInactiveThe control does not accept drag-and-drop operations.
dndProgramThe developer sets the drag-and-drop operation programmatically.
Remarks

Drag-and-drop operations managed automatically or set programmatically

WINDEVJava Automatic drag-and-drop operations are available for Edit, List Box, ListView, TreeView and Table controls.
New in version 2024
automatic Drag and Drop is also available for edit control "Text tokens"..
Drag-and-drop operations can be set programmatically for the following controls:
  • Edit control
  • List Box and ListView control
  • TreeView control
  • Table control
  • Image control
  • Bar Code control
  • Button control
  • Looper control
  • Chart control
  • TreeView Table control
  • Calendar control
  • Organizer control
  • Scheduler control
Java Only automatic drag-and-drop operations are available.

Limits

WINDEV The DndTarget property can only be used with the following controls:
  • Edit control,
  • Button control,
  • Check Box control,
  • Radio Button control,
  • Tab control,
  • List Box or ListView control,
  • Combo Box control,
  • Table or TreeView Table control,
  • TreeView control,
  • Looper control,
  • Image control,
  • Spin control,
  • Slider control,
  • Scrollbar control,
  • Chart control,
  • Calendar control,
  • Range Slider control,
  • Organizer control,
  • Scheduler control,
  • .NET 2.0 control (WinForm)
  • Rating control.
Java The DndTarget property can only be used on Edit, List Box and TreeView controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/24/2024

Send a report | Local help