Hi all,
I know drag and drop on the WE aspect of Xojo is being worked on - I noticed a thread about 5 months ago from the Xojo Forums that had a technique to make it work about implementing a module. I was wondering if anyone got this to work with the current edition of Xojo (2014r1.1) or has any other tips? I realize it’s probably not optimal, but I’d really like to experiment a bit if possible…
I honestly think I’m implementing it wrong as I am getting javascript errors about undefined functions…
Throw this in a module
Sub draggable(extends wc as WebControl, assigns isDraggable as Boolean)
if isDraggable then
wc.ExecuteJavaScript("Xojo.get('"+wc.ControlID+"').draggable = 'true';")
else
wc.ExecuteJavaScript("Xojo.get('"+wc.ControlID+"').draggable = 'false';")
end
'This Control currently is known to support RectControl
End Sub
Then you can do something like RectControl.Draggable = true
I’ve been too busy to setup the drop events yet, but a single web control wrapper that picks up all the drop events will do the trick. Just make sure you pass the ControlId of what it was dropped on as a parameter and then you can get that control in XOJO.