ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Drag-and-drop operations managed automatically or set programmatically
  • Limitation
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
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.
    The automatic Drag and Drop mode is also available for tokens in a "Text token" Edit control.
  • 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
// -- Initialization of LIST_Source
// LIST_Source is not a target
LIST_Source.DndSource = dndInactive

// -- Initialization of LIST_Target
LIST_Target.DndTarget = dndProgram
DnDEvent("Drop", "LIST_Target", dndDrop)
DnDEvent("DragOver", "LIST_Target", 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

WINDEVJava Automatic drag-and-drop operations are available for Edit, List Box, ListView, TreeView and Table controls.
The automatic Drag and Drop mode is also available for tokens in a "Text token" Edit control.
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.
WEBDEV - Server code Automatic drag-and-drop operations are available for the following controls:
  • Upload control,
  • Static 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

WINDEV The DndSource property can only be used with the following controls:
  • Edit control,
  • List Box control,
  • ListView control,
  • TreeView control,
  • Looper control,
  • Image control,
  • Chart control,
  • Table control,
  • TreeView Table control,
  • Calendar control,
  • Organizer control,
  • Scheduler control,
  • Button control,
  • Rating control.
Java The DndSource property applies only to Edit, List Box and TreeView controls.
WEBDEV - Server code The DndSource property can only be used with the following controls:
  • Edit control,
  • Button control,
  • Static 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: 06/12/2024

Send a report | Local help