Skip to content

Commit 4e03fea

Browse files
committed
docs
1 parent b49eb9e commit 4e03fea

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/guide/content.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Content
22

3-
Content may be returned from
3+
Custom widgets will typically implement a [`render()`][textual.widget.Widget.render] method which returns the *content* of the widget.
4+
In other words, the output that will be displayed within the widget's borders.
5+
There are a few ways for you to specify this content.
6+
7+
- Text — either plain text, or [markup](#markup).
8+
- [Content](#content-class) objects — for more advanced control over output.
9+
- Rich renderables — any object that may be printed with [Rich](https://rich.readthedocs.io/en/latest/).
10+
11+
In this chapter, we will cover all these methods.
412

513
## Markup
614

@@ -10,7 +18,7 @@ This is known as *Textual markup*.
1018

1119
Before we explore Textual markup in detail, let's first demonstrate some of what it can do.
1220
In the following example, we have two widgets.
13-
The top has Textual markup enabled, and the bottom has Textual markup *disabled*.
21+
The top has Textual markup enabled, while the bottom widget has Textual markup *disabled*.
1422

1523
Notice how the markup *tags* change the style in the first widget, but are left unaltered in the second:
1624

@@ -46,6 +54,7 @@ You can experiment with markup by entering it in to the textarea at the top of t
4654
You might find it helpful to try out some of the examples from this guide in the playground.
4755

4856
!!! note "What are Variables?"
57+
4958
You may have noticed the "Variables" tab. This allows you to experiment with [variable substitution](#markup-variables).
5059

5160
### Tags

docs/tutorial.md

+3
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ The `TimeDisplay` is currently very simple, all it does is extend `Digits` witho
195195

196196
The `Stopwatch` widget class extends the `HorizontalGroup` container class, which will arrange its children into a horizontal row. The Stopwatch's `compose()` adds those children, which correspond to the components from the sketch above.
197197

198+
!!! tip "Coordinating widgets"
199+
200+
If you are building custom widgets of your own, be sure to see guide on [coordinating widgets](./guide/widgets.md#coordinating-widgets).
198201

199202
#### The buttons
200203

0 commit comments

Comments
 (0)