
Button displays a push, toggle, check, or radio button with text and/or an image. Buttons can also be used as the children of a ToolBar
.
Slots
- command
-
Command command
Command associated with this button. Setting the command automatically maps the text, icon, enable state, and eventing to the command.
- font
-
Font font := null
Font for text. Defaults to null (system default).
-
static internal Str fontId := "font"
-
static internal Str getSelectedId := "getSelected"
- image
-
Image image := null
Image to display on button. Defaults to null.
-
static internal Str imageId := "image"
- mode
-
const ButtonMode mode := ButtonMode.push
Button mode defines the style: check, push, radio, or toggle. If the button is a child of a ToolBar then you can also use sep; plus radio and toggle mean the same thing. The default is push. This field cannot be changed once the button is constructed.
- onAction
-
|Event| onAction
Callback function when button is pressed or selection is changed.
- selected
-
Bool selected
The button's selection state (if check, radio, or toggle)
-
static internal Str setSelectedId := "setSelected"
- text
-
Str text := ""
Text of the button. Defaults to "".
-
static internal Str textId := "text"