Changing size of images in groups
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Changing size of images in groups
hi,
I have created a group made up of various images. I have made changes to the original dimensions of these images. However as soon as I place them into the group, they snap back to their original size. Also any changes I make to them while in the group, don't stick - as soon as I come out of "Edit Group", they are back to their original size. I know I could set "Lock size and position", but I anticipate doing a fair bit of manual adjustment to these images, and I'd rather not have to keep switching this setting on and off. Is there any way of working with images in groups that makes them keep whatever dimensions i have currently assigned to them?
-- DavidF.
I have created a group made up of various images. I have made changes to the original dimensions of these images. However as soon as I place them into the group, they snap back to their original size. Also any changes I make to them while in the group, don't stick - as soon as I come out of "Edit Group", they are back to their original size. I know I could set "Lock size and position", but I anticipate doing a fair bit of manual adjustment to these images, and I'd rather not have to keep switching this setting on and off. Is there any way of working with images in groups that makes them keep whatever dimensions i have currently assigned to them?
-- DavidF.
Re: Changing size of images in groups
Hi David,
Sorry, couldn't resist, but this is the only way to handle this in Livecode!
Best
Klaus
yep, set their "lockloc" to true!Is there any way of working with images in groups that makes them keep whatever dimensions i have currently assigned to them?
Sorry, couldn't resist, but this is the only way to handle this in Livecode!
Best
Klaus
Re: Changing size of images in groups
Thanks Klaus! You know in the back of my mind I know this is how you have to do it, yet I always seem to hope to find a way round it.
It feels particularly aggravating somehow when you're working with a group and trying to get everything arranged as you want it.
-- DavidF.
It feels particularly aggravating somehow when you're working with a group and trying to get everything arranged as you want it.
-- DavidF.
Re: Changing size of images in groups
Locking the size doesn't prevent you from either manually resizing the images or doing it through code, which, while I'm sure you know this, is being stated for others that might not but come along later
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Changing size of images in groups
One could surely set the lockloc under script control.
But is there a message sent when such an operation takes place? In that case, one could make a plug-in that automatically (pseudo):
Craig Newman
But is there a message sent when such an operation takes place? In that case, one could make a plug-in that automatically (pseudo):
Code: Select all
on messageThatNoticesNewImportedImage
set the lockLoc of last image to "true"
...
Last edited by dunbarx on Sun Apr 29, 2018 2:58 am, edited 1 time in total.
Re: Changing size of images in groups
well... but setting lockLoc = true would stop me manually resizing it, wouldn't it?
In the fullness of time I plan to have some scripting to manipulate the group and its components, it's just a bit annoying in the preliminary stage of positioning and resizing images to have to keep turning lockLoc on and off. But as dunbarx suggested there's probably some scripting that could help automate that.
-- DavidF.
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Changing size of images in groups
So there is indeed a message sent when a new image is created (newImage), but it is sent to the image, not to the card or stack.
I have always had to rush in and set the lockLoc os a newly imported and resized image by hand, before nudging it a single pixel made it revert to it s original rect. I think this might warrant a request to the team, so make the default lockLoc of a new image "true".
Craig
I have always had to rush in and set the lockLoc os a newly imported and resized image by hand, before nudging it a single pixel made it revert to it s original rect. I think this might warrant a request to the team, so make the default lockLoc of a new image "true".
Craig
Re: Changing size of images in groups
If you mean by the resize handles, yes, however that is not the only way to manually resize something Or you could just type it in. It is habit for me now to set the lockLoc to true when plopping the image control on the form, but when I import images, I set the lockLoc and then type in the size I want, it usually works very well (for me). Hope it helps you as well