docs(screens): add mention of DEFAULT_MODE

Add mention of the `DEFAULT_MODE` to the mode documentation.
This commit is contained in:
TomJGooding
2025-03-04 10:51:30 +00:00
parent dd36b696ec
commit cefd94f993

View File

@@ -329,6 +329,8 @@ You can switch between these screens at any time by calling [`App.switch_mode`][
When you switch to a new mode, the topmost screen in the new stack becomes visible.
Any calls to [`App.push_screen`][textual.app.App.push_screen] or [`App.pop_screen`][textual.app.App.pop_screen] will affect only the active mode.
You can set which mode will be active when the app starts by setting the [`DEFAULT_MODE`][textual.app.App.DEFAULT_MODE] class variable.
Let's look at an example with modes:
=== "modes01.py"