StandardButton#

The StandardButton looks like a button, but instead of customizing with text and icon, it can used one of the pre-defined kind and the text and icon will depend on the style.

Properties#

  • enabled: (in bool): Defaults to true. When false, the button can’t be pressed

  • has-focus: (out bool): Set to true when the button currently has the focus

  • kind (in enum StandardButtonKind): The kind of button, one of ok cancel, apply, close, reset, help, yes, no, abort, retry or ignore

  • pressed: (out bool): Set to true when the button is pressed.

Callbacks#

  • clicked()

Example#

import { StandardButton, VerticalBox } from "std-widgets.slint";
export component Example inherits Window {
  VerticalBox {
    StandardButton { kind: ok; }
    StandardButton { kind: apply; }
    StandardButton { kind: cancel; }
  }
}