Box

class tanmatsu.widgets.Box(*args, border: bool = True, border_label: str | None = None, **kwargs)

Bases: Widget

A widget that can draw a border around itself. Does nothing else. Widgets that need a border should inherit from this class.

Parameters
  • border (bool) – Whether the border should be drawn or not.

  • border_label (str | None) – A label to be drawn in the top-left of the border.

property border: bool
Getter

Get whether a border is drawn around this widget.

Setter

Set whether a border is drawn around this widget.

property border_label: str | None
Getter

Get the label drawn in the upper left of this widget’s border.

Setter

Set the label that should be drawn in the upper left of this widget’s border. If set to None, no border label will be drawn.