Replace pict in buttons

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
Gurki
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 30
Joined: Wed Jul 10, 2013 6:34 pm

Replace pict in buttons

Post by Gurki » Fri Jun 22, 2018 6:41 am

Hello
This is probabely a complete beginners question. I took an existing stack (*) and wanted to adapt it (change the pictures, text, ...). It looks to me that all the pictures are on buttons, but now, I have no idea, how to acces them to replace them. I would like to solve the problem myself, but apparently I am looking for the wrong keywords. Any ideas or links?
Thank you for any help.
G.


(*) https://web.archive.org/web/20160324083 ... h.livecode

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Replace pict in buttons

Post by SparkOut » Fri Jun 22, 2018 6:54 am

The picture on a button will be "the icon".
This is referenced by a number, which is the id of the image you want to use. So if you import an image to a spare place in your stack that is not typically visible, you can check it in the property inspector and see its id, let's assume 27314.
Then you can

Code: Select all

set the icon of button "myFancyButton" to 27314

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Replace pict in buttons

Post by dunbarx » Fri Jun 22, 2018 5:24 pm

Hi.

What Sparkout said, and he is probably correct.

But if the "pictures" are not the icons of the button (you can test this by asking for the icon of the button. If it is "0", there is no icon) then perhaps an image overlies that button.

I only mention this because you mentioned "picture". That seemed like much more than just a simple icon.

Craig Newman

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”