TabBox¶
- class tanmatsu.widgets.TabBox(*args, **kwargs)¶
Bases:
ContainerWidget that contains other widgets, arranged as tabs.
- add_child(name: str, widget: Widget)¶
Add a tab named name containing widget widget. If a tab with that name already exists, then the widget corresponding to the name is updated instead.
- Parameters
name (str) – The name of the tab to add.
widget (Widget) – The widget object to add.
- del_child_by_name(name: str)¶
Delete the tab with name name.
- Parameters
name (str) – The name of the tab to delete.
- Raises
KeyError – if a tab named name does not exist.
- del_child_by_widget(widget: Widget)¶
Delete the tab containing widget widget.
- Parameters
widget (Widget) – The widget object to delete.
- Raises
KeyError – if the object widget is not contained within any tabs.
- left()¶
Switch the currently active tab to the left.
- right()¶
Switch the currently active tab to the right.