Static¶
A widget which displays static content. Can be used for Rich renderables and can also be the base for other types of widgets.
- Focusable
- Container
Example¶
The example below shows how you can use a Static
widget as a simple text label (but see Label as a way of displaying text).
Reactive Attributes¶
This widget has no reactive attributes.
Messages¶
This widget posts no messages.
Bindings¶
This widget has no bindings.
Component Classes¶
This widget has no component classes.
See Also¶
Bases: Widget
A widget to display simple static content, or use as a base class for more complex widgets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
A Rich renderable, or string containing console markup. |
required | |
|
bool
|
Expand content if required to fill container. |
False
|
|
bool
|
Shrink content if required to fill container. |
False
|
|
bool
|
True if markup should be parsed and rendered. |
True
|
|
str | None
|
Name of widget. |
None
|
|
str | None
|
ID of Widget. |
None
|
|
str | None
|
Space separated list of class names. |
None
|
|
bool
|
Whether the static is disabled or not. |
False
|
update
¶
update(content='')
Update the widget's content area with new text or Rich renderable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
RenderableType | SupportsVisual
|
New content. |
''
|