ui.Checkbox.onChange

Registers a callback that's fired when the value of the checkbox changes.

Returns an ID which can be passed to unlisten() to unregister the callback.

UsageReturns
Checkbox.onChange(callback)String
ArgumentTypeDetails
this: ui.checkboxui.Checkbox

The ui.Checkbox instance.

callbackFunction

The callback to fire when the value of the checkbox changes. The callback is passed a boolean indicating whether the checkbox is now checked and the checkbox widget.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!