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.
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?
Button Images - Newbie help
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Button Images - Newbie help
Hi, did you try the resize code I sent? You could try something along the lines of;
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.
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
LiveCode Development & Training : http://splash21.com
Re: Button Images - Newbie help
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
Here's a video link to show you what I'm talking about...http://gomotherrucker.com/download/lc/l ... pgrade.mov
Re: Button Images - Newbie help
splash21 wrote:Hi, did you try the resize code I sent? You could try something along the lines of;
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.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
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.
Re: Button Images - Newbie help
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
Marco