Drag-and-drop operations managed automatically or set programmatically Limitation
DndSource (Property)
In french: DndSource
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:
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. 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.
LISTE_Source . DndSource = dndInactive
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:
dndAuto Drag-and-drop operations are handled automatically dndInactive Drag and Drop is disabled for this control dndProgram The 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.
dndAuto Drag-and-drop operations are handled automatically dndInactive Drag and Drop is disabled for this control dndProgram The developer sets the drag-and-drop operation programmatically
Remarks
Drag-and-drop operations managed automatically or set programmatically
This page is also available for…