Scout/Concepts/ToggleButton
Scout |
Wiki Home |
Website |
Download • Git |
Community |
Forums • Blog • Twitter • G+ |
Bugzilla |
Bugzilla |
Specific type of Button (one of the Scout Form Field)
Description
The ToggleButton is a Button with 2 states (selected booleean).
If the user clicks on the ToggleButton then the button will be selected as long as the user clicks on it again.
Screenshot
State | RAP | SWT | Swing | Swing Rayo |
---|---|---|---|---|
Normal | ![]() |
![]() |
![]() |
![]() |
Selected | ![]() |
![]() |
![]() |
![]() |
Code Example
@Order(10.0) public class ToggleButtonDefaultField extends AbstractButton { @Override protected int getConfiguredDisplayStyle() { return DISPLAY_STYLE_TOGGLE; } @Override protected String getConfiguredLabel() { return TEXTS.get("PushToSelect"); } @Override protected boolean getConfiguredProcessButton() { return false; } }
Properties
Defined with getConfiguredXxxxxx() methods.
See also the Field page for the properties that all fields have in common.
- DisplayStyle needs to be configured to DISPLAY_STYLE_TOGGLE.
Events
Defined with execXxxxxx() methods.
See also the Field page for the events that all fields have in common.