Two ListViews: drag from one to another
-
Hey guys,
I have two listviews. One ListView has several items which I want to drop into another ListView (TargetList).
When I drag into the TargetList I want the other items move away (indicate the drop position). After drop I don't want to remove the item from the source-list.Here is what I did:
I've created an additional delegate item which is invisible.
When I start dragging I move it over the underlying delegate on the sourceList and make it visible.
I placed a DropArea in my TargetList, so I can drop it there.
So far so good.As long as the list is empty everything is fine. When there is already an item in the TargetList I want to move it a little bit away to indicate the drop-position.
Therefor I placed a DropArea inside my target delegate. Unfortunately this DropArea doesn't receive any events as the ListView DropArea is on top of it.First of all: Is this the right approach or would you recommend something different?
If I'm on the right path, how can I forward the mouse-events through the overlaying dropArea to the underlying dropArea?Best regards
mts