Replies: 2 comments 2 replies
-
From @renderable.setter
def renderable(self, renderable: RenderableType) -> None:
if isinstance(renderable, str):
if self.markup:
self._renderable = Text.from_markup(renderable)
else:
self._renderable = Text(renderable)
else:
self._renderable = renderable |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can get what you want if you just use from textual import app, widgets
from rich import text
class Test(app.App):
def compose(self) -> app.ComposeResult:
yield widgets.DataTable()
def on_mount(self) -> None:
table = self.query_one(widgets.DataTable)
table.add_column("test")
table.add_row(text.Text(":id:"))
table.add_row(text.Text("[red]red"))
Test().run() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
DataTable
renders:emoji:
andrich
markup for cells/rows added as plain strings. I don't see any way to disable this, it would be great if there wereemoji
andmarkup
parameters somewhere that I could set toFalse
, similar to other widgets likeStatic
.Beta Was this translation helpful? Give feedback.
All reactions