Controls > Advanced Controls > Button > About Buttons
About Buttons
The Button scriptable control allows you to accept user input in the form of button selection and de-selection. By default, push buttons, return either a 1 or a 0 (on or off). More sophisticated behavior is programmed through a script using the Button class, and other features of your scripting language. You can change the appearance of a button by right-clicking and choosing Edit > Properties. Otherwise, you can set the formatting properties through the script.
You can only change a single state setting for the Button control using the Properties tab. To program appearance effects for both states of the Button, you must use the script. Settings programmed into the script override settings made in the Properties dialog.
In the default script for Button, notice that there are four events, Start, Exec, Stop, and Click. The Exec event is where inputs and outputs can be processed, namely returning the state of the button. Procedures for formatting the button itself can be taken care of in the Start event or using the Properties tab. The Click event is most important where push buttons are concerned because that's where state changes are handled and where the control is re-executed after the user has changed their selection. Note that for a default button, there is no visible manifestation of a state change.
Was this helpful?