Resize Object from one card to another

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
bqsbarbqGAnC5Z
Posts: 77
Joined: Thu Dec 08, 2011 12:19 pm

Resize Object from one card to another

Post by bqsbarbqGAnC5Z » Fri Aug 10, 2012 6:04 am

Hi all, quick question about resizing my objects.

I've got an image (say ID= 1) that I imported on card 1 and I have a button on card 2 that I set to have icon = 1 so that the button looks exactly like the image. The image was originally 1000x1000 pixels but I used a function to resize it to 200x200 pixels on card 1. However, when I go to card 2 and try to view the button, it retains the original size of the image, which is far too big for my purposes. Does anyone know how I can keep the size changed across cards?

Any help would be much appreciated! Thank you!

Adrian
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 79
Joined: Wed Jul 11, 2012 5:03 pm

Re: Resize Object from one card to another

Post by Adrian » Fri Aug 10, 2012 8:44 am

Can you resize the image before importing it?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resize Object from one card to another

Post by Klaus » Fri Aug 10, 2012 11:25 am

Did you set the "lockloc" of the image to TRUE?
If not, the image will resize to its original dimensions when you leave the card with the image!

Sounds like this could be the culprit.

bqsbarbqGAnC5Z
Posts: 77
Joined: Thu Dec 08, 2011 12:19 pm

Re: Resize Object from one card to another

Post by bqsbarbqGAnC5Z » Tue Aug 14, 2012 7:21 am

Yep! lockloc proved to be the answer! Thanks for the help, wasn't aware of such a feature in LC and this worked perfectly.

Post Reply