mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Remove the bell from the actions02 documentation example
This commit is contained in:
@@ -5,7 +5,6 @@ from textual import events
|
|||||||
class ActionsApp(App):
|
class ActionsApp(App):
|
||||||
def action_set_background(self, color: str) -> None:
|
def action_set_background(self, color: str) -> None:
|
||||||
self.screen.styles.background = color
|
self.screen.styles.background = color
|
||||||
self.bell()
|
|
||||||
|
|
||||||
async def on_key(self, event: events.Key) -> None:
|
async def on_key(self, event: events.Key) -> None:
|
||||||
if event.key == "r":
|
if event.key == "r":
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Although it is possible (and occasionally useful) to call action methods in this
|
|||||||
|
|
||||||
The following example replaces the immediate call with a call to [action()][textual.widgets.Widget.action] which parses an action string and dispatches it to the appropriate method.
|
The following example replaces the immediate call with a call to [action()][textual.widgets.Widget.action] which parses an action string and dispatches it to the appropriate method.
|
||||||
|
|
||||||
```python title="actions02.py" hl_lines="10-12"
|
```python title="actions02.py" hl_lines="9-11"
|
||||||
--8<-- "docs/examples/guide/actions/actions02.py"
|
--8<-- "docs/examples/guide/actions/actions02.py"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user