AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de arrastrar y soltar
  • Programmed Drag and Drop
DnDIsDataAvailable (Example)
Programmed Drag and Drop
The following code is used to copy/paste text data (CF_TEXT constant).
//- - Initialize the target control ("EDT_Find")
EDT_Find.DndTarget = dndProgram
// Call the OnDrop procedure when the left mouse button
// is released on the target control named "EDT_Find"
DnDEvent("OnDrop", EDT_Find, dndDrop)
// Call the OnDragOver procedure when the mouse cursor
// moves between the source control and the target control ("EDT_Find")
DnDEvent("OnRollover", EDT_Find, dndDragOver)
PROCEDURE OnDragOver()
// Is the type of data available?
IF DnDIsDataAvailable(CF_TEXT) = True THEN
// Cursor indicating the move
DnDCursor(dndMove)
ELSE
// Cursor indicating that the move is not allowed
DnDCursor(dndNone)
END
PROCEDURE OnDrop()
// Is the type of data available?
IF DnDIsDataAvailable(CF_TEXT) = True THEN
// The move is allowed (but not the copy)
DnDAccept(dndMove)
ELSE
// No action is allowed
DnDAccept(dndNone)
END
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local