Page 1 of 1

Reorder group elements

Posted: Wed Nov 11, 2015 9:47 am
by kevin007
Hi all,

I have a group it contains another subgroup. Please see the below attached image. when I drag item1 below, all item inside item1 should be placed in current location, is it possible. :roll:

Thanks
Kevin

Re: Reorder group elements

Posted: Wed Nov 11, 2015 4:24 pm
by dunbarx
Hi.

Not sure what you mean. Is each of the "items" listed its own group? It may just be that you have to set "the selectGroupedControls" to "true". Read about this in the dictionary, and experiment.

Or if I am not understanding, write back.

Craig Newman

Re: Reorder group elements

Posted: Mon Jul 02, 2018 4:22 am
by trinitylogics
I'm sure after three years Kevin, this has been solved. Any luck on a comprehensive solution? I'm working on this now for fun and just need to solve the scrolling issue.

Thanks,

E

Re: Reorder group elements

Posted: Mon Jul 02, 2018 6:01 pm
by jacque
Look at the relayer command and see if that helps.

Re: Reorder group elements

Posted: Wed Jul 04, 2018 3:01 am
by trinitylogics
Thanks Jacque,

That’s great advice. I do use that command to reorder the list once an item is dropped into its new place. Of course this assumes the layers are supposed to be from top to bottom on the y-axis. Can’t think of a reason not to have it like that.

Anyway, the behavior is done and I’ll post a demo stack as soon as I clean it up if anyone is interested.

Re: Reorder group elements

Posted: Fri Jul 06, 2018 10:49 pm
by trinitylogics
Here's a demo of drag/drop to reorder a list of grouped items. It uses graphics as the list items for now, but should support any type of list item as well as mixed list items or different sizes.

Any feedback is welcome and if someone has solved this already, I'd love to see the code if available.

Re: Reorder group elements

Posted: Sun Jul 08, 2018 9:39 am
by jmburnod
Hi trinitylogics,
Thank you for sharing.
I noticed an issue when you drag an item to the end of the list.
For example if you drag item 1 to the end list it seems disappear but it comes just after item 11 with a reduced height.
DragOrderListIssue.png
DragOrderListIssue.png (6.67 KiB) Viewed 7824 times
Best regards
Jean-Marc
(OSX 10.13, LC indy 9.0.0)

Re: Reorder group elements

Posted: Sun Jul 08, 2018 6:40 pm
by trinitylogics
Thanks Jean-Marc,

Found the problem.

Re: Reorder group elements

Posted: Fri Nov 20, 2020 7:51 pm
by micmac
Hi

Did anyone fix the bug mentioned in the next-last post

Mic

Re: Reorder group elements

Posted: Fri Nov 20, 2020 10:45 pm
by jmburnod
Sorry no idea
You maybe try to send a private message to trinitylogics
Best regards
Jean-Marc

Re: Reorder group elements

Posted: Sat Nov 21, 2020 9:49 am
by micmac
I did, Jean-Marc, but have not had any reply.

This thread is his only share.

Looking at the code he looks like a pro.

Mic

Re: Reorder group elements

Posted: Sun Nov 29, 2020 11:23 pm
by micmac
Hi

If it has interest for any of you, this is a horizontal version of the above stack by trinityLogics.

Mic
DragOrderListHorizontal.livecode.zip
(6.22 KiB) Downloaded 261 times