OutlineButton
A simple button with an outline border.
Properties
text
(in string): The text written in the button.icon
(in image): The image to show in the button. Note that not all styles support drawing icons.primary
(in bool): If set to true the button is displayed with the primary accent color (default: false).has_focus
: (out bool): Set to true when the button has keyboard focus.has_hover
: (out bool): Set to true when the mouse if over the button.pressed
: (out bool): Set to true when the button is pressed.enabled
: (in bool): Defaults to true. When false, the button cannot be pressed
Callbacks
clicked()
Example
import { OutlineButton } from "@coop/lib.slint";
export component Example inherits Window {
VerticalBox {
OutlineButton {
text: "Click Me";
clicked => { self.text = "Clicked"; }
}
}
}