logo

class

fwt::Button

sys::Obj
  fwt::Widget
    fwt::Button

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.

Source

font

Font font := null

Font for text. Defaults to null (system default).

Source

image

Image image := null

Image to display on button. Defaults to null.

Source

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.

Source

onAction

|Event| onAction

Callback function when button is pressed or selection is changed.

Source

selected

Bool selected

The button's selection state (if check, radio, or toggle)

Source

text

Str text := ""

Text of the button. Defaults to "".

Source