Drag & Drop with WTreeNode ?
Added by Hyeoni Hwasoo about 10 years ago
Hi !
Is it possible to drag and drop WTreeNode widget (inside a WTree widget) ? Like a file explorer for example ? I would like to move an element in another place in the tree ...
Regards,
Hyeon
Replies (3)
RE: Drag & Drop with WTreeNode ? - Added by Hyeoni Hwasoo about 10 years ago
I'm trying with :
node~~label()~~>setDraggable("own_type", node, false, node);
But the treenode disappears once I click down (even before I move the mouse). Is it possible to prevent this behaviour ?
Hyeon.
RE: Drag & Drop with WTreeNode ? - Added by Koen Deforche about 10 years ago
Hey,
You need to specify a dragWidget that differs from the node. Usually this is a WImage (that acts like an icon). See also the drag&drop widget in the examples folder of Wt (which is different from the treeview-dragdrop example).
Regards,
koen