PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Programmed Drag and Drop: Example
DnDEvent (Example)
Programmed Drag and Drop: Example
The following code is used to delete the data from a List Box control by Drag and Drop into a Button control with a recycle bin icon. Only the move (cut/paste) is allowed. 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 Bin Button control
DnDEvent("OnDrop", BTN_Bin, dndDrop)
// Call the OnRollover procedure when the mouse cursor
// moves between the source List Box control and the Button control BTN_Bin
DnDEvent("OnRollover", BTN_Bin, dndDragOver)
PROCEDURE OnRollover()
// Cursor indicating the move
DnDCursor(dndMove)
// Procedure called by the dndDrop event
PROCEDURE 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