TreeView, multiple selection and DnD


#1

Hi Jules,

When using the TreeView with multiple selection enabled, Drag n Drop only works for only one element in the selection.
Is this the normal behavior ?

Thanks,


#2

It drags the item that the mouse is on, but it’s easy to ask the tree for its current selection and use that in your handler code. Have a look at the new jucer - that lets you drag multiple items around in the tree.


#3

oki doki.

That’s what I did so far but was wondering if there was a better solution.

Thanks,


#4

I don’t really see how there could be a better solution. None of the d+d code has any understanding of the things that are being dragged, it’s always the job of the drag target to ask the source for any specific information that it needs about the items.