Reorder by drag and drop

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Reorder by drag and drop

Post by kaveh1000 » Fri Jan 11, 2019 6:26 pm

I have a number of grouped controls, grouped vertically inside another group. I want to change the order of the grouped controls by drag and drop. I have not used dragdrop yet, but using mousestilldown to move the groups. Then on mouserelease I reorder and arrange by vertical position.

What is the best way to have a good interface for this action? Ideally I want the other groups to move out of the way and create space as needed. See attached illustration pls.
Attachments
drag.png
Kaveh

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Reorder by drag and drop

Post by [-hh] » Fri Jan 11, 2019 7:37 pm

When I saw this I remembered a stack made in Aug 2017 and uploaded it.
See "Sample Stacks" or
http://livecodeshare.runrev.com/stack/9 ... veDragGrid

You could also use (with much more features) my LCB widget "IconGrid",
see "Sample Stacks" or http://livecodeshare.runrev.com/stack/904/
shiftLock happens

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Reorder by drag and drop

Post by kaveh1000 » Fri Jan 11, 2019 9:34 pm

Thank you so much Hermann, as always. I need to spend some time studying these, but they seem to be just what I need. :-)
Kaveh

Post Reply

Return to “Talking LiveCode”