Skip to content

Dialog Example #908

Answered by davep
mlafois asked this question in Q&A
Oct 14, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

It's a little tricky to follow what you're trying here, but I take it from the above that you're taking modal01.py and trying to modify it to create an example login dialog, complete with an Input? I've taken modal01.py and modified the dialog in a similar way to how you're doing here and it has the intended result:

from textual.app import App, ComposeResult
from textual.containers import Grid
from textual.screen import Screen
from textual.widgets import Static, Header, Footer, Button, Input


class QuitScreen(Screen):
    def compose(self) -> ComposeResult:
        yield Grid(
            Static("Are you sure you want to quit?", id="question"),
            Input(placeholder="Login"),
   …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@mlafois
Comment options

@mlafois
Comment options

Answer selected by mlafois
Comment options

You must be logged in to vote
1 reply
@mlafois
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants