Group not resizing when objects are moved

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
soitech
Posts: 11
Joined: Fri Feb 06, 2015 8:09 pm

Group not resizing when objects are moved

Post by soitech » Mon Jul 13, 2015 11:55 pm

I've got a group of a couple dozen objects, and when I move any of the objects, they disappear as they pass the boundary of the group.
The group resizes automatically when a handler sets all the images back to their starting locations, the group shrinks to be just big enough to fit the objects. But when another handler moves them horizontally, they clip off at the boundary as the group doesn't resize.

I've checked the groups properties, fiddled with setting lockLocation to false in the script, read through the api, searched the forums, etc etc.

I can set the size of the group, then set lockLocation to true to hold it at a big enough size to show the moving shapes, but this makes a mess of things elsewhere when the same objects are used on another card in a different place. If nothing else I can go through card by card, and set the size of the group and lock it down, but this isn't very elegant, and the lockLocation entry in the dictionary pretty clearly states "If the lockLocation of a group is false, the group is automatically resized when the objects in it are moved, resized, hidden, or shown." So why can I not get it to actually work as described? What would interfere with this functionality?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Group not resizing when objects are moved

Post by jacque » Tue Jul 14, 2015 8:36 pm

It should work. Is the group's boundingRect set to empty? To auto-resize, the lockloc has to be false and the boundingrect has to be empty.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

soitech
Posts: 11
Joined: Fri Feb 06, 2015 8:09 pm

Re: Group not resizing when objects are moved

Post by soitech » Tue Jul 14, 2015 10:32 pm

BoundingRect box in the preference panel is empty. Should I try explicitly setting it to empty in the script?
Locked box is unchecked and I've explicitly set lockLoc to false in the script.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Group not resizing when objects are moved

Post by jacque » Wed Jul 15, 2015 4:32 pm

You could try setting it to empty but it doesn't sound like that would make any difference. There may be something specific to your stack structure that's interfering. Can you reproduce the problem in a simple test stack with only a single group? It worked okay when I did that.

If a test stack shows the same problem, post it here and we'll take a look.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

soitech
Posts: 11
Joined: Fri Feb 06, 2015 8:09 pm

Re: Group not resizing when objects are moved

Post by soitech » Wed Jul 15, 2015 10:18 pm

Thanks. Good to know I'm not totally wrong about the concept at least. I will put together a test stack and try that out when I get a chance. I have a feeling it will probably work fine with that and that there's something interfering in the stack structure.

Post Reply