OpenDCL Forums

OpenDCL => Show and Tell => Topic started by: BazzaCAD on January 11, 2008, 04:04:33 PM

Title: Example showing how to use Drag & Drop in a ListBox
Post by: BazzaCAD on January 11, 2008, 04:04:33 PM
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]
Title: Re: Example showing how to use Drag & Drop in a ListBox
Post by: Kelie on January 11, 2008, 08:15:07 PM
Quote from: BazzaCAD on January 11, 2008, 04:04:33 PM
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?
Title: Re: Example showing how to use Drag & Drop in a ListBox
Post by: BazzaCAD on January 12, 2008, 12:13:37 AM
Quote from: Kelie on January 11, 2008, 08:15:07 PM
Quote from: BazzaCAD on January 11, 2008, 04:04:33 PM
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.
Title: Re: Example showing how to use Drag & Drop in a ListBox
Post by: BazzaCAD on January 12, 2008, 12:48:51 AM
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]
Title: Re: Example showing how to use Drag & Drop in a ListBox
Post by: Kelie on January 13, 2008, 12:48:29 AM
Quote from: BazzaCAD on January 12, 2008, 12:13:37 AM

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.