Button
Related: GUI System
setEnabled()
Set the Enabled state of the toolbar button.
Usage
ts
this.setEnabled(state: boolean): voidsetPressed()
Set the Active state of the toolbar button. Also toggles the Enabled state as well.
Usage
ts
this.setPressed(state: boolean): voidonPress()
Bind a callback that is invoked whenever the button is pressed.
Usage
ts
this.onPress(cb: (state: boolean) => void): voidYou can also bind a button directly to the visibility of a view. See the view documentation for more information.