how to script an icon into a button

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
robm80
Posts: 161
Joined: Sat May 03, 2014 7:15 am

how to script an icon into a button

Post by robm80 » Mon Jul 14, 2014 3:02 pm

I think I have looked everywhere to find a script for placing an image (icon, bmp, png) into a button.
Manually with "icons & borders" no problem, but what syntax for:
set ???????? of button "try" to image "foo.jpg or image id 1006)
Thanks

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: how to script an icon into a button

Post by Klaus » Mon Jul 14, 2014 3:21 pm

Hi Rob,

you already got it :D
...
set the ICON of btn X to 1003
...


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: how to script an icon into a button

Post by FourthWorld » Mon Jul 14, 2014 3:21 pm

See "icon" in the Dictionary, where you'll find this example:
set the icon of button "Help" to "Question Mark"
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply