Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 978 Bytes

toolbar-item.rst

File metadata and controls

54 lines (32 loc) · 978 Bytes

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