Feedback
Applications can initiate custom drag-and-drop operations
- Status
- Accepted
- Fixed in
- -
- Source discussion
- https://forum.objo.dev/d/862-missing-class-dragitem-like-xojo
- Last updated
- 2026-08-18
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Objo desktop applications can receive drag-and-drop content through the existing Control.DragEnter, DragOver, DragExit, and Drop events, but application code cannot currently start a drag operation of its own.
Add a source-side DragItem class so a control can package text and application-defined string data during a mouse drag and begin a native cross-platform drag-and-drop operation. Existing target controls should receive the content through DragData.
A typical workflow should be concise:
Sub Card_MouseDrag(x As Double, y As Double)
Var item As New DragItem(Me)
item.Text = "Card 42"
item.SetData("dev.objo.card-id", "42")
item.Drag()
End Sub
The receiving control can accept the drop through the existing events and inspect either the standard text or the named application data.