Page 1 of 1

Button icon resizing

Posted: Wed Jul 18, 2012 9:59 pm
by mbot023
Greetings,

I'm a graphics designer attempting to learn LiveCode - completely new.

My question: when skinning a button with your own images (initial, rollover, onclick), is it possible to proportionally resize the images used when the stack is resized? I know one can resize graphics directly, but graphics used in skinned buttons?

Thanks and regards,
-m

Re: Button icon resizing

Posted: Wed Jul 18, 2012 10:28 pm
by jmburnod
Hi mbot023,

Unfortunatelly, resizing icon of a btn is not directly possible in LiveCode.
That is possible if you resize the image used by the button, the icon is resized.

Best regards

Jean-Marc

Re: Button icon resizing

Posted: Thu Jul 19, 2012 2:33 pm
by Klaus
Hi mbot023,

1. welcome to the forum :D

2. exactly as Jean-Marc said, you need to resize the IMAGES that are displayed inside of buttons as icons!
Here a little trick to update your buttons correctly AFTER you resized an image used as an icon.
a.lock screen ## ALWAYS! :D
b. resize you image(s)
c. "update" the button:
...
set the icon of btn "your button here" to the icon of btn "your button here"
...
This will force a redraw of the icon in the buttons after you resized the image.


Best

Klaus

Re: Button icon resizing

Posted: Thu Jul 19, 2012 5:13 pm
by mwieder
d. unlock screen

Unlock the screen when you're done. Locking and unlocking the screen should be done in pairs, since locking calls will nest. The screen will unlock properly after the last nested "unlock" call.

Re: Button icon resizing

Posted: Thu Jul 19, 2012 5:25 pm
by mbot023
Perfect! Sounds like a good solution -- I'll give it a try.

Thanks!
-m