Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1066 raised the issue that most widgets cannot be disabled. Lots of UIs use this concept so I would like to add this functionality.
This PR adds the option to disable the
checkbox
widget. I used the API from in thebutton
widget: the checkbox is disabled until you callon_toggle
to register the function that produces a message. Aon_toggle_maybe
method, that takes an optional function, is provided to make it easier to change the enabled/disabled state. If this is the desired API then I'll make separate PR's for the other widgets, or I can add them to this one, whatever you prefer.I don't have UI design experience so I'm not set on the styling and I'm happy to take suggestions for improvements.