File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ def __init__(
5353
5454 @property
5555 def visual (self ) -> Visual :
56+ """The visual to be displayed.
57+
58+ Note that the visual is what is ultimately rendered in the widget, but may not be the
59+ same object set with the `update` method or `content` property. For instance, if you
60+ update with a string, then the visual will be a [Content][textual.content.Content] instance.
61+
62+ """
5663 if self ._visual is None :
5764 self ._visual = visualize (self , self ._content , markup = self ._render_markup )
5865 return self ._visual
@@ -64,6 +71,7 @@ def content(self) -> VisualType:
6471
6572 @content .setter
6673 def content (self , content : VisualType ) -> None :
74+ self ._content = content
6775 self ._visual = visualize (self , content , markup = self ._render_markup )
6876 self .clear_cached_dimensions ()
6977 self .refresh (layout = True )
You can’t perform that action at this time.
0 commit comments