textual_enhanced.dialogs
Provides useful dialogs.
Confirm
Bases: ModalScreen[bool]
A modal dialog for confirming things.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
The title for the dialog. |
required |
|
str
|
The question to ask the user. |
required |
|
str
|
The text for the yes button. |
'Yes'
|
|
str
|
The text for the no button. |
'No'
|
action_no
action_no()
Send back the negative response.
action_yes
action_yes()
Send back the positive response.
compose
compose()
Compose the layout of the dialog.
HelpScreen
HelpScreen(help_for=None)
Bases: ModalScreen[None]
The help screen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Screen[Any] | None
|
The screen to show the help for. |
None
|
action_close
action_close()
Close the help screen.
compose
compose()
Compose the layout of the help screen.
input_help
input_help(node)
visit
visit(event)
Visit any link clicked in the help.
ModalInput
ModalInput(placeholder=None, initial='', classes=None)
Bases: ModalScreen[str | None]
A modal screen to get input from the user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str | None
|
The placeholder text to use. |
None
|
|
str
|
The initial value for the input. |
''
|
|
str | None
|
The CSS classes of the modal input. |
None
|
accept_input
accept_input()
Accept the input.
action_escape
action_escape()
Escape out without getting the input.
compose
compose()
Compose the input dialog.