Hi,
thought I'd post this anew because I've completely recoded and reworked what is a small library. The main differences between what was just a 'hack' the first time and this far more structured offering is of course being able to drag multiple rows at a time. Also, as many ListIcons can be enabled for drag/drop as the developer sees fit and this time, the destination row is shaded to show you exactly where the rows would be dropped if you were to release the mouse button etc.
http://www.purecoder.net/purebasic/Drag_rows.zip
Regards.
Drag multiple rows in ListIcon - Library
Drag multiple rows in ListIcon - Library
I may look like a mule, but I'm not a complete ass.
Brill!
I can use this in lots of ways.
Just a suggestion: It would be neat if there were a flag for EnableListIconDrag() that sets weather behaviour should be a copy or a move of data.
Again thanks for Sharing.
Is very useful together with Danilo's ListIconGadget Sorting with Header Rows
viewtopic.php?t=9113&highlight=listicongadget+sort
I can use this in lots of ways.
Just a suggestion: It would be neat if there were a flag for EnableListIconDrag() that sets weather behaviour should be a copy or a move of data.
Again thanks for Sharing.
Is very useful together with Danilo's ListIconGadget Sorting with Header Rows
viewtopic.php?t=9113&highlight=listicongadget+sort
Ta - N
There already is! Glad to see that someone is as bad at reading the docs as myself!Just a suggestion: It would be neat if there were a flag for EnableListIconDrag() that sets weather behaviour should be a copy or a move of data.

Code: Select all
EnableListIconDrag(#Gadget, flags)
Code: Select all
#drag_DragFromEnable (means the ListIcon can have selected rows dragged)
#drag_DragToEnable (means the ListIcon can have rows dropped on to it)
#drag_CutFrom
Code: Select all
EnableListIconDrag(1, #drag_DragFromEnable|#drag_CutFrom)
Regards.
I may look like a mule, but I'm not a complete ass.