Page 1 of 1

Replace pict in buttons

Posted: Fri Jun 22, 2018 6:41 am
by Gurki
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

Re: Replace pict in buttons

Posted: Fri Jun 22, 2018 6:54 am
by SparkOut
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

Re: Replace pict in buttons

Posted: Fri Jun 22, 2018 5:24 pm
by dunbarx
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