ToggleContainer¶
-
class
reducer.gui.
ToggleContainer
(*args, **kwd)[source]¶ Bases:
ipywidgets.widgets.widget_box.VBox
A widget whose state controls the visibility of its chilren.
Same as parameters for a ~IPython.html.widgets.Box, but note that the description of the ToggleContainer is used to set the description of the checkbox that controls the display, AND
- toggle_type : {‘checkbox’, ‘button’}, optional
- Specify the type of boolean widget used to toggle the display
- container : ContainerWidget
- Object to which children should be added.
- toggle : ToggleButtonWidget or CheckboxWidget
- The toggle object, provided primarily to allow styling of it.
- disabled : bool
- Gets and sets whether the entire widget is disabled, i.e. the toggle box and all children of this widget controlled by the toggle.
Do NOT set the children of the ToggleContainer; set the children of
ToggleContainer.children
or use the add_child method.Attributes Summary
container
Widget that contains the elements controlled by the toggle. disabled
True if widget is disabled. is_sane
Subclasses can define a method that indicates whether the current combination of settings is sensible. toggle
Toggle widget that controls other display elements. visible
A boolean (True, False) trait. Methods Summary
action
()Subclasses should override this method if they wish to associate an action with the widget. add_child
(child)Append a child to the container part of the widget. display
()Display and format this widget. format
()Format widget. Attributes Documentation
-
container
¶ Widget that contains the elements controlled by the toggle.
-
disabled
¶ True if widget is disabled.
-
is_sane
¶ Subclasses can define a method that indicates whether the current combination of settings is sensible.
- sanity : bool or None
- True if the settings are sensible, False if not, None if not overridden.
-
toggle
¶ Toggle widget that controls other display elements.
-
visible
¶ A boolean (True, False) trait.
Methods Documentation
-
action
()[source]¶ Subclasses should override this method if they wish to associate an action with the widget.