Page 1 of 1

Drag multiple rows in ListIcon - Library

Posted: Fri Nov 04, 2005 2:14 am
by srod
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.

Posted: Tue Nov 08, 2005 1:30 pm
by naw
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

Posted: Tue Nov 08, 2005 2:20 pm
by srod
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.
There already is! Glad to see that someone is as bad at reading the docs as myself! :D

Code: Select all

EnableListIconDrag(#Gadget, flags)
flags are a combination of the following:

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
E.g.

Code: Select all

EnableListIconDrag(1, #drag_DragFromEnable|#drag_CutFrom)
This enables the ListIcon for dragging from (but not to) and dragged rows will be cut (instead of the default of copying).

Regards.

Posted: Tue Nov 08, 2005 8:14 pm
by Tranquil
Funny! Thanks for sharing!