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 »

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: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Button icon resizing

Post 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
https://alternatic.ch
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Button icon resizing

Post 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
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Button icon resizing

Post 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.
mbot023
Posts: 2
Joined: Wed Jul 18, 2012 9:27 pm

Re: Button icon resizing

Post by mbot023 »

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

Thanks!
-m
Post Reply