Drag multiple rows in ListIcon - Library

Developed or developing a new product in PureBasic? Tell the world about it.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Drag multiple rows in ListIcon - Library

Post 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.
I may look like a mule, but I'm not a complete ass.
naw
Enthusiast
Enthusiast
Posts: 573
Joined: Fri Apr 25, 2003 4:57 pm

Post 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
Ta - N
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

Funny! Thanks for sharing!
Tranquil
Post Reply