diff --git a/src/textual/app.py b/src/textual/app.py index 92af444452..b8509c214c 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -2287,6 +2287,11 @@ def get_screen( ) -> Screen: """Get an installed screen. + Example: + ```python + my_screen = self.get_screen("settings", MyScreen) + ``` + Args: screen: Either a Screen object or screen name (the `name` argument when installed). screen_class: Class of expected screen, or `None` for any screen class.