Button

Native button, can also be used as checkbox and radio button.

Modulerequire("gui")
TypeClass
InheritsView

Class methods

create(title)

Create a normal button with title.

Parameters

Return

Button

create(options)

Create a button by reading options.

Parameters

Return

Button

Methods

makeDefault()

Mark this button as default button.

setTitle(title)

Set button title.

Parameters

getTitle()

Return the button title.

Return

String

setChecked(checked)

Set checked state of checkbox or radio.

Parameters

isChecked()

Return whether checkbox or radio is checked.

Return

Boolean

setImage(image)

Set the image of button.

Parameters

getImage()

Return the image of button.

Return

Image

setButtonStyle(style) macOS

Set the visual style of the button.

Parameters

setControlSize(size) macOS

Set the control size of the button.

Parameters

setHasBorder(yes) macOS

Set whether the button has a border.

Parameters

hasBorder() macOS

Return whether the button has a border.

Return

Boolean

Events

onClick(self)

Emitted when button is clicked.

Parameters

Preventable

No.