Button Images - Newbie help

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
rvanar
Posts: 26
Joined: Fri Aug 05, 2011 10:43 am

Button Images - Newbie help

Post by rvanar » Tue Oct 11, 2011 12:21 pm

Hello,
I'm new here and testing out mobgui as well as live code, I'm running into an issue of button images not getting resized. I’m storing all my images for buttons on a separate substack card. Is it not resizing because I haven't opened the card that I'm referencing? I tried searching the forum and couldn't find anyone else having this problem.

Below is the image of what I'm getting.
Screen Shot 2011-10-11 at 8.12.11 PM.png
Screen Shot 2011-10-11 at 8.12.11 PM.png (116.34 KiB) Viewed 5119 times
If anyone could provide code that would correct this image button allowing MobGui to do the conversion. Should I pre-open the card with the images?

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: Button Images - Newbie help

Post by splash21 » Thu Oct 13, 2011 10:21 am

Hi, did you try the resize code I sent? You could try something along the lines of;

Code: Select all

set the width of image "Menu1" of stack "Images" to 100
set the icon of button "Button1" to the icon of button "Button1" -- refresh the button icon
or you could use actual images instead of buttons - they will also respond to touch events and you can use the MobGUI geometry management if required.
LiveCode Development & Training : http://splash21.com

rvanar
Posts: 26
Joined: Fri Aug 05, 2011 10:43 am

Re: Button Images - Newbie help

Post by rvanar » Thu Oct 13, 2011 10:49 am

I will try that code in the mean time not sure why it worked just fine in 4.6.4 and not in 5.0

Here's a video link to show you what I'm talking about...http://gomotherrucker.com/download/lc/l ... pgrade.mov

rvanar
Posts: 26
Joined: Fri Aug 05, 2011 10:43 am

Re: Button Images - Newbie help

Post by rvanar » Thu Oct 13, 2011 11:01 am

splash21 wrote:Hi, did you try the resize code I sent? You could try something along the lines of;

Code: Select all

set the width of image "Menu1" of stack "Images" to 100
set the icon of button "Button1" to the icon of button "Button1" -- refresh the button icon
or you could use actual images instead of buttons - they will also respond to touch events and you can use the MobGUI geometry management if required.

Thanks your idea about refreshing the button icon helped - Much appreciated! - But I'm still puzzled about why was this refresh not needed in the previous version.

mvetto
Posts: 3
Joined: Sat Oct 29, 2011 1:44 pm

Re: Button Images - Newbie help

Post by mvetto » Thu Dec 08, 2011 1:43 pm

same problem here. but your solution did not work. where should I place the code? in the main stack? in the card pre open (the main, the one containing the images?) thx
Marco

Post Reply

Return to “MobGUI”