Skip to content

Resize

The Resize event is sent to a widget when its size changes and when it is first made visible.

  • Bubbles
  • Verbose

Attributes

attribute type purpose
size Size The new size of the Widget
virtual_size Size The virtual size (scrollable area) of the Widget
container_size Size The size of the container (parent widget)

Code

textual.events.Resize class

def __init__(self, size, virtual_size, container_size=None):

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