Button icon resizing

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mbot023
Posts: 2
Joined: Wed Jul 18, 2012 9:27 pm

Button icon resizing

Post by mbot023 » Wed Jul 18, 2012 9:59 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Button icon resizing

Post by jmburnod » Wed Jul 18, 2012 10:28 pm

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
https://alternatic.ch

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

Re: Button icon resizing

Post by Klaus » Thu Jul 19, 2012 2:33 pm

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Button icon resizing

Post by mwieder » Thu Jul 19, 2012 5:13 pm

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.

mbot023
Posts: 2
Joined: Wed Jul 18, 2012 9:27 pm

Re: Button icon resizing

Post by mbot023 » Thu Jul 19, 2012 5:25 pm

Perfect! Sounds like a good solution -- I'll give it a try.

Thanks!
-m

Post Reply