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 |
---|---|---|---|
|
VisualType
|
A Content object, Rich renderable, or string containing console markup. |
''
|
|
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
|
visual
property
¶
The visual to be displayed.
Note that the visual is what is ultimately rendered in the widget, but may not be the
same object set with the update
method or content
property. For instance, if you
update with a string, then the visual will be a Content instance.