Skip to content

Commit c2eff2d

Browse files
committed
Screen events
1 parent 1613d7c commit c2eff2d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/guide/screens.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Like [pop_screen](#pop-screen), if the screen being replaced is not installed it
128128
You can also switch screens with the `"app.switch_screen"` action which accepts the name of the screen to switch to.
129129

130130

131+
131132
## Screen opacity
132133

133134
If a screen has a background color with an *alpha* component, then the background color will be blended with the screen beneath it.
@@ -355,3 +356,12 @@ One for a dashboard, one for settings, and one for help.
355356
We've bound keys to each of these screens, so the user can switch between the screens.
356357

357358
Pressing ++d++, ++s++, or ++h++ switches between these modes.
359+
360+
361+
## Screen events
362+
363+
Textual will send a [ScreenSuspend](../events/screen_suspend.md) event to screens that have become inactive due to another screen being pushed, or switching via a mode.
364+
365+
When a screen becomes active, Textual will send a [ScreenResume](../events/screen_resume.md) event to the newly active screen.
366+
367+
These events can be useful if you want to disable processing for a screen that is no longer visible, for example.

0 commit comments

Comments
 (0)