Drag&Drop with Multiple sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Drag&Drop with Multiple sources

Günther Schmidt
Hi,

thanks to Ted Brecht I managed to implement a simple D&D from a
ListPresenter with a single selection onto another object.

Now I'd need some help how to do D&D from the same ListPresenter with
multiple selected objects.

I've managed to switch the ListPresenter's view to "Multiple selection
enhanced ..." and that part works fine (except maybe for a "select all").

But the D&D part doesn't there always seems to be only one
InternalDragDropObject.

Guenther


Reply | Threaded
Open this post in threaded view
|

Re: Drag&Drop with Multiple sources

Yar Hwee Boon-3
On Wed, 12 Jan 2005 23:39:10 +0100, Günther Schmidt <[hidden email]>  
wrote:

> Hi,
>
> thanks to Ted Brecht I managed to implement a simple D&D from a  
> ListPresenter with a single selection onto another object.
>
> Now I'd need some help how to do D&D from the same ListPresenter with  
> multiple selected objects.
>
> I've managed to switch the ListPresenter's view to "Multiple selection  
> enhanced ..." and that part works fine (except maybe for a "select all").
>
> But the D&D part doesn't there always seems to be only one  
> InternalDragDropObject.

One way would be to simply use ListPresenter#selection/#selections and  
populate the InternalDragDropObject using that.

--
Regards
HweeBoon
MotionObj


Reply | Threaded
Open this post in threaded view
|

Re: Drag&Drop with Multiple sources

Chris Uppal-3
In reply to this post by Günther Schmidt
Günther Schmidt wrote:

> I've managed to switch the ListPresenter's view to "Multiple selection
> enhanced ..." and that part works fine (except maybe for a "select all").
>
> But the D&D part doesn't there always seems to be only one
> InternalDragDropObject.

I think you may have mutated your list into a MultipleSelectionListBox
(corresponding to ListPresenter.'Multi-selection list box') rather than into a
MultipleSelectionListView (ListPresenter.'Multi-selection enhanced list view').

For some reason, the M.S.L.Box seems to provide only a single object when you
drag from it, whereas a M.S.L.View populates the DragSession's #dragObjects
with all the selected objects, as you'd expect.  I don't know why the M.S.L.Box
suffers from this problem -- it may be a Windows thing since the code looks the
same in both View classes (to a casual glance).

    -- chris