Reorder group elements

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
kevin007
Posts: 40
Joined: Mon Sep 21, 2015 7:46 am

Reorder group elements

Post by kevin007 » Wed Nov 11, 2015 9:47 am

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
Attachments
drag.png
drag.png (6.9 KiB) Viewed 6768 times
--
Thanks
Kevin

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9647
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reorder group elements

Post by dunbarx » Wed Nov 11, 2015 4:24 pm

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

trinitylogics
Posts: 7
Joined: Mon Jul 02, 2018 4:17 am

Re: Reorder group elements

Post by trinitylogics » Mon Jul 02, 2018 4:22 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Reorder group elements

Post by jacque » Mon Jul 02, 2018 6:01 pm

Look at the relayer command and see if that helps.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trinitylogics
Posts: 7
Joined: Mon Jul 02, 2018 4:17 am

Re: Reorder group elements

Post by trinitylogics » Wed Jul 04, 2018 3:01 am

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.

trinitylogics
Posts: 7
Joined: Mon Jul 02, 2018 4:17 am

Re: Reorder group elements

Post by trinitylogics » Fri Jul 06, 2018 10:49 pm

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.
Attachments
DragOrderList.livecode.zip
(5.93 KiB) Downloaded 188 times

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Reorder group elements

Post by jmburnod » Sun Jul 08, 2018 9:39 am

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 6321 times
Best regards
Jean-Marc
(OSX 10.13, LC indy 9.0.0)
https://alternatic.ch

trinitylogics
Posts: 7
Joined: Mon Jul 02, 2018 4:17 am

Re: Reorder group elements

Post by trinitylogics » Sun Jul 08, 2018 6:40 pm

Thanks Jean-Marc,

Found the problem.

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: Reorder group elements

Post by micmac » Fri Nov 20, 2020 7:51 pm

Hi

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

Mic

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Reorder group elements

Post by jmburnod » Fri Nov 20, 2020 10:45 pm

Sorry no idea
You maybe try to send a private message to trinitylogics
Best regards
Jean-Marc
https://alternatic.ch

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: Reorder group elements

Post by micmac » Sat Nov 21, 2020 9:49 am

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

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: Reorder group elements

Post by micmac » Sun Nov 29, 2020 11:23 pm

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 188 times

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”