Example showing how to use Drag & Drop in a ListBox

Started by bazzacad · 2008-01-12 00:04 UTC · 4 replies · SMF topic #133

This example shows how to use the Drag & Drop events of a ListBox control to rearrange the items inside it.
(Click to view)

[attachment deleted by admin]
author=BazzaCAD link=topic=133.msg528#msg528 date=1200096273 wrote:
This example shows how to use the Drag & Drop events of a ListBox control to rearrange the items inside it.
(Click to view)


Barry, I haven't read your code yet. Just wondering if you can drag & drop multiple items at once?
author=Kelie link=topic=133.msg530#msg530 date=1200111307 wrote:
[quote author=BazzaCAD link=topic=133.msg528#msg528 date=1200096273]
This example shows how to use the Drag & Drop events of a ListBox control to rearrange the items inside it.
(Click to view)


Barry, I haven't read your code yet. Just wondering if you can drag & drop multiple items at once?


It doesn't look like it's possible, because when the OnDragnDropBegin fires, it deselects all the others except for the one you dragged from.
I've updated it so you can drag between 2 listboxes or within itself...
Some of the code it a little redundant, but I'm too tired to clean it up right now.


[attachment deleted by admin]
author=BazzaCAD link=topic=133.msg531#msg531 date=1200125617 wrote:

It doesn't look like it's possible, because when the OnDragnDropBegin fires, it deselects all the others except for the one you dragged from.


Thanks for the answer, Barry.