tree documentation

This commit is contained in:
Will McGugan 2021-01-09 15:28:04 +00:00
parent 63135caeba
commit 4a9ed9c53a
4 changed files with 17 additions and 12 deletions

View file

@ -20,15 +20,16 @@ Welcome to Rich's documentation!
traceback.rst
prompt.rst
tables.rst
columns.rst
group.rst
live.rst
markdown.rst
padding.rst
panel.rst
group.rst
columns.rst
live.rst
progress.rst
markdown.rst
syntax.rst
tables.rst
tree.rst
protocol.rst

View file

@ -35,4 +35,5 @@ Reference
reference/text.rst
reference/theme.rst
reference/traceback.rst
reference/tree.rst
references/abc.rst

View file

@ -9,7 +9,10 @@ You can consider this class to be like a string with marked up regions of text.
One way to add a style to Text is the :meth:`~rich.text.Text.stylize` method which applies a style to a start and end offset. Here is an example::
from rich.console import Console
from rich.text import Text
console = Console()
text = Text("Hello, World!")
text.stylize("bold magenta", 0, 6)
console.print(text)