Skip to content

Text log

TextLog

Bases: ScrollView

clear()

Clear the text log.

render_lines(crop)

Render the widget in to lines.

Parameters:

Name Type Description Default
crop Region

Region within visible area to.

required

Returns:

Type Description
list[Strip]

A list of list of segments

write(content, width=None, expand=False, shrink=True)

Write text or a rich renderable.

Parameters:

Name Type Description Default
content RenderableType | object

Rich renderable (or text).

required
width int | None

Width to render or None to use optimal width. Defaults to None.

None
expand bool

Enable expand to widget width, or False to use width. Defaults to False.

False
shrink bool

Enable shrinking of content to fit width. Defaults to True.

True