This project is read-only.

DragDrop from outside to a specific position...

Dec 28, 2008 at 12:53 PM
Hi,
is it possible to Drag and Drop a file from outside (for example, the Desktop) on the ListControl?!
I wish to add the name of the file to the List at the position, where I drop it.
How can I do this?
Jan 8, 2009 at 2:46 PM
>is it possible to Drag and Drop a file from outside
Yep there is an example of drag drop under the examples folder. Whilst it doesn't quite do what you want you should be able to debug around it and see how dropping is handled for your scenario. In the example check out methods _listControl_DragOverEx, _listControl_DragDropEx as well as class SuperlistDragEventArgs.

>I wish to add the name of the file to the List at the position, where I drop it.
Ah well that's more tricky as the list has sorting capabilities - In its unsorted state the list will show the items in the order that they've been added so you would have to delete all the items and re-add them again to achieve what you want as the code currently stands. If you don't have thousands of entries this shouldn't be a big deal and the list shouldn't flicker.

Regards
Lee