Skip to content

Bases: Event

Sent when the app or widget has been resized.

  • Bubbles
  • Verbose

Parameters:

Name Type Description Default

size

Size

The new size of the Widget.

required

virtual_size

Size

The virtual size (scrollable size) of the Widget.

required

container_size

Size | None

The size of the Widget's container widget.

None

container_size instance-attribute

container_size = (
    size if container_size is None else container_size
)

The size of the Widget's container widget.

pixel_size instance-attribute

pixel_size = pixel_size

Size of terminal window in pixels if known, or None if not known.

size instance-attribute

size = size

The new size of the Widget.

virtual_size instance-attribute

virtual_size = virtual_size

The virtual size (scrollable size) of the Widget.

from_dimensions classmethod

from_dimensions(cells, pixels)

Construct from basic dimensions.

Parameters:

Name Type Description Default

cells

tuple[int, int]

tuple of (, ) in cells.

required

pixels

tuple[int, int] | None

tuple of (, ) in pixels if known, or None if not known.

required