PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Drag and Drop
  • Programmed or automatic Drag and Drop
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures

Drag and Drop

For some types of controls, WINDEV and WEBDEV propose an automatic management of Drag and Drop: to do so, check the corresponding option in the "Details" tab of the control description. Then, a control can be defined as source or target of Drag and Drop.
The automatic Drag and Drop is available:
  • WINDEV for Edit, List Box, ListView and TreeView controls.
In a Programmed Drag and Drop, the DndSource and DndTarget properties are used to define the Drag and Drop source and target controls.
DndTarget is used to find out and modify the behavior of a control during "Drag and Drop". This control will be defined as target for "Drag and Drop", which means that "Drag and Drop" will be performed toward this control.
Example
WINDEV
// -- Initialize the LIST_Source list
// LIST_Source is not a target
LIST_Source.DndTarget = dndInactive
 
// -- Initialize the LIST_Target list
LIST_Target.DndTarget = dndProgram
DnDEvent("Drop", "LIST_Target", dndDrop)
DnDEvent("DragOver", "LIST_Target", dndDragOver)
Syntax

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

<Management of Drag and Drop> = <Control used>.DndTarget
<Management of Drag and Drop>: Constant
Identifies the behavior of the target control for Drag and Drop.
dndAutoAutomatic management of Drag and Drop
dndInactiveDrag and Drop is disabled for this control
dndProgramDrag and Drop from this control must be managed by the developer
<Control used>: Control name
Name of the control to be used.

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

<Control used>.DndTarget = <Management of Drag and Drop>
<Control used>: Control name
Name of control to use.
<Management of Drag and Drop>: Constant
Identifies the behavior of the target control for Drag and Drop.
dndAutoAutomatic management of Drag and Drop
dndInactiveDrag and Drop is disabled for this control
dndProgramDrag and Drop from this control must be managed by the developer
Remarks

Programmed or automatic Drag and Drop

WINDEVJava An automatic Drag and Drop is available for edit controls, list boxes, listviews, treeviews and tables.
A programmed Drag and Drop is available for the following controls:
  • Edit control
  • List box and listview
  • TreeView
  • Table
  • Image
  • Bar code
  • Button
  • Looper
  • Chart
  • TreeView Table
  • Calendar
  • Organizer
  • Scheduler
Java Only the automatic Drag and Drop is available.

Limits

WINDEV The DndTarget property can only be used with the following controls:
  • edit controls,
  • buttons,
  • check boxes and radio buttons,
  • tabs,
  • list boxes or listviews,
  • combo boxes,
  • tables or treeview tables
  • treeviews,
  • loopers,
  • image controls,
  • spins, sliders, scrollbars,
  • Chart controls,
  • calendars,
  • Versions 15 and later
    range sliders,
    New in version 15
    range sliders,
    range sliders,
  • Versions 15 and later
    organizers,
    New in version 15
    organizers,
    organizers,
  • Versions 16 and later
    schedulers,
    New in version 16
    schedulers,
    schedulers,
  • Versions 16 and later
    .NET 2.0 controls (WinForm)
    New in version 16
    .NET 2.0 controls (WinForm)
    .NET 2.0 controls (WinForm)
  • Versions 17 and later
    Rating controls.
    New in version 17
    Rating controls.
    Rating controls.
Java The DndTarget property applies only to Edit, List Box and TreeView controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment