Skip to content

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
Parameter Default Description
size
Size
required

The new size of the Widget.

virtual_size
Size
required

The virtual size (scrollable size) of the Widget.

container_size
Size | None
None

The size of the Widget's container widget.

container_size instance-attribute

container_size = (
    size if container_size is None else container_size
)

The size of the Widget's container widget.

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.