align/justify text in Panel? #1359
-
I would like to left/right/center align text in a Panel like from rich import print
from rich.panel import Panel
message = "\n".join(["x", "xxxxx"])
print(Panel.fit(message))
The results I'm looking for are
I've only seen |
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Jul 22, 2021
Replies: 1 comment 3 replies
-
Try this... from rich.text import Text
message = Text("\n".join(["x", "xxxxx"]), justify = "right") |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
nschloe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this...