Replies: 3 comments 3 replies
-
same question |
Beta Was this translation helpful? Give feedback.
0 replies
-
See rich.Align, specifically the |
Beta Was this translation helpful? Give feedback.
3 replies
-
Confirming the example works as expected in a recent version of rich: >>> from rich.console import Console
>>> from rich.table import Table
>>> from rich.align import Align
>>>
>>> console = Console()
>>>
>>> table = Table(show_header=False)
>>> table.add_row(
... # the order of the cells doesn't play a role here
... Align("Dev 20, 2019", vertical="middle"),
... "\n".join(["Star Wars: The Rise of Skywalker"] * 5),
... )
>>>
>>> console.print(table)
┌──────────────┬──────────────────────────────────┐
│ │ Star Wars: The Rise of Skywalker │
│ │ Star Wars: The Rise of Skywalker │
│ Dev 20, 2019 │ Star Wars: The Rise of Skywalker │
│ │ Star Wars: The Rise of Skywalker │
│ │ Star Wars: The Rise of Skywalker │
└──────────────┴──────────────────────────────────┘ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if possible, but can i align vertically the text on a table cell? thanks!
Beta Was this translation helpful? Give feedback.
All reactions