1) Import your icons from your desktop by clicking on File >> Import As Control. Drag a button to your project.
Here I have two icons. The button will display an earth. Then once is is activated it will display a light bulb.
2) Right click on your button and click Property Inspector.
Click on the top drop down box with ‘Basic Properties’. Click on Icons & Border like in the photo below.
3) Click on the wand to the right of the Icon box. Select your Icon. I will select the world.
4) Repeat as above and select your “on” state button for the hilite icon. I will choose the lightbulb.
5) Back on the basic properties. Unselect ‘Show Name’
Now for the coding!
6) Right click on the button and click ‘Edit Script’. Replace the script with something similar to this adding your own variable names.
if tVariable = 0 then
set the hilite of me to true
put “1” into tVariable
set the hilite of me to false
put “0” into tVariable
And that’s it. There is probably an easier way to do this and I welcome your suggestions to update my blog to make it simple and easy.