This package contains widget extensions to the standard ipywidgets
package.
The intent is to not produce completely new widgets, but rather extend the widgets already in ipywidgets
with more possibilities and options.
The dropdown widget has been extended to include the possibility of:
- disabling options; and
- grouping the options.
This can be done via the disabled_options
traitlet, which must be a list of option labels.
If an option label is included in the disabled_options
list traitlet, it will be "grayed out", i.e., disabled (but still visible) in the dropdown widget.
Using the grouping
parameter instead of the options
parameter, options can be grouped as desired.
The format is similar to the value for options
, but each grouping of options should be paired with a header, i.e., you'll the value to be an iterable of (header, options
)-pairs.
One can introduce un-grouped options by passing an empty header, i.e., an empty string (""
).
Author: Casper Welzel Andersen (email, website).
License: BSD-3-Clause and copyright (c) 2020 Casper Welzel Andersen & parts by Jupyter Development Team.