ToolbarButton

A widget/button that can only be used in a Toolbar

-- setting the title to - (dash) treats it as a separator
local homepage = ToolbarButton(title: optional)

Properties

setOnClick(callback)

The function executed when the button is clicked

setText(text)

Sets the text on the button

setIcon(path)

Sets an icon on the button

setToolTip(tooltip)

Sets the tooltip for the button

setMenu(menu)

Sets a menu for the button

setCheckable(checkable: bool)

Allows the button to be checkable or to be toggled

isChecked()

Checks if the button is checked/toggles

setChecked(check: bool)

Checks/toggles the button

setVisibility(visible: bool)

Sets the visibility for the button