Button

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

Modulerequire("yue.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.