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