ToggleButton is a button that stays pressed when clicked by the user. In other words, it is similar to CheckBox in functionality but looks like a Button.
You can see ToggleButton in action in the sixth page of the controls sample.
NB: This class is not available under Universal ports such as X11.
There are no special styles for ToggleButton.
See also window styles overview.
| evt_togglebutton(id) { | event | ... } | Handles a button click event. |
ToggleButton.new(Window parent, Integer id, String label,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = 0,
Validator val,
String name = "checkBox")
Constructor, creating and showing a toggle button.
NULL.ToggleButton#create, Validator
destructor()
Destructor, destroying the toggle button.
Boolean create(Window parent, Integer id, String label,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = 0,
Validator val,
String name = "checkBox")
Creates the toggle button for two-step construction. See ToggleButton.new for details.
Boolean get_value()
Gets the state of the toggle button.
Returns true if it is pressed, false otherwise.
set_value(Boolean state)
Sets the toggle button to the given state. This does not cause a
EVT_TOGGLEBUTTON event to be emitted.
true, the button is pressed.[This page automatically generated from the Textile source at Wed Sep 09 02:21:28 +0100 2009]