Can WebControls be dragged?

Is it possible to drag any WebControl objects in a Web app? I can see in the documentation there is mention of WebControl.MouseDrag event but I can’t see any controls that appear to implement it.

Drag and drop is something the Xojo team is currently working on. It will be nice when it has full support. In the meantime you can cheat and implement it using Javascript.

Implement this method in a Module, then you simply call it:
textField1.draggable = true

[code]Sub draggable(extends wc as webControl, assigns isDraggable as Boolean)
if isDraggable then
wc.ExecuteJavaScript(“Xojo.get(’”+wc.ControlID+"’).draggable = ‘true’;")
wc.ExecuteJavaScript(“Xojo.get(’”+wc.ControlID+"’).draggable = ‘false’;")

'These Controls are currently known to support (On Chrome):
End Sub

It’s worth noting that all this gets you is controls which can be dragged around on the screen… And there are no events to go with it.

If you have some “widgets” which a user should be able to arrange, its quite helpful to know how to drag&drop them.

Why not? That only depends on when those elements are created.

I meant that you won’t get drag events.

Well, I don´t know about Xojo, but with RB 4.3 it was “possible”. Unfortunately you needed some JS to notify the RB App on the Server about the new coordinates – which wasn´t very comfortable.

I will upgrade to Xojo the day I can compile iOS Apps, so I have no clue if this ain´t possible anymore. This is definitely a feature which is kind of a “MUST”.