Skip to content

Commit cd3e238

Browse files
committed
Wording
1 parent 8b99b3f commit cd3e238

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/guide/widgets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ which let them call [actions](../guide/actions.md) in response to key presses.
198198
A widget is only able to handle key presses if it or one of its descendants has [focus](../guide/input.md#input-focus).
199199

200200
Widgets aren't focusable by default.
201-
In order to allow a widget to be focused, we need to set `can_focus=True` when defining a widget subclass.
202-
Let's look at an example of defining a `Counter` widget which can be focused.
201+
To allow a widget to be focused, we need to set `can_focus=True` when defining a widget subclass.
202+
Here's an example of a simple focusable widget:
203203

204204
=== "counter01.py"
205205

@@ -223,9 +223,9 @@ Let's look at an example of defining a `Counter` widget which can be focused.
223223
```
224224

225225

226-
Our app contains three `Counter` widgets, which we can focus by clicking or using ++tab++ and ++shift+tab++.
226+
The app above contains three `Counter` widgets, which we can focus by clicking or using ++tab++ and ++shift+tab++.
227227

228-
Now that our counter is focusable, let's make it interactive by adding some key bindings and actions to it.
228+
Now that our counter is focusable, let's add some keybindings to it to allow us to change the count using the keyboard.
229229
To do this, we add a `BINDINGS` class variable to `Counter`, with bindings for ++up++ and ++down++.
230230
These new bindings are linked to the `change_count` action, which updates the `count` reactive attribute.
231231

0 commit comments

Comments
 (0)