ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Drag and drop functions
  • Programmed Drag and Drop
DnDCursor (Example)
Programmed Drag and Drop
The following code is used to delete the data from a List Box control by Drag and Drop into a Button control associated with a recycle bin icon. The move cursor is displayed during the move (cut/paste) between the List Box control and the Button control "BTN_Bin"
//- - Initialize the Button control BTN_Bin
BTN_Bin..DnDTarget = dndProgram
 
 
// Call the OnDrop procedure when the left mouse button
// is released on the Button control BTN_Bin
DnDEvent("OnDrop", BTN_Bin, dndDrop)
 
 
// Call the OnDragOver procedure when the mouse cursor
// moves between the source List Box and BTN_Bin
DnDEvent("OnDragOver", BTN_Bin, dndDragOver)
PROCEDURE OnDragOver()
// Cursor indicating the move
DnDCursor(dndMove)
// Procedure called by the dndDrop event
PROCÉDURE OnDrop()
// Only the move is allowed (not the copy)
DnDAccept(dndMove)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help