OutlineButton
A button with an outline border.
Properties
text
(in string): The text written in the button.prefix_icon
(in image): The image to show before the text.suffix_icon
(in image): The image to show after the text.enabled
(in bool): If set tofalse
the button is disabled.has_hover
(out bool): Button sets this totrue
when the mouse is over it.has_focus
(out bool): Button sets this totrue
when the area has keyboard focus.pressed
(out bool): Set totrue
by the button when the mouse is pressed over it.enter_pressed
(out bool): Set totrue
by the button when the area has focus and enter key is pressed.style
(in ButtonStyle): Defines the style of the button.
Callbacks
clicked()
: Invoked when clicked: A finger or the left mouse button is pressed, then released on this element.
Example
import { OutlineButton, MagicVerticalBox } from "@vivi/magic.slint";
export component Example inherits Window {
MagicVerticalBox {
OutlineButton {
text: "Click Me";
clicked => { self.text = "Clicked"; }
}
}
}