ui.Checkbox.onChange

Stay organized with collections Save and categorize content based on your preferences.

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.CheckboxThe ui.Checkbox instance.
callbackFunctionThe 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.