class documentation

class ACMEDialog(ModalScreen):

Constructor: ACMEDialog(message, buttonOK, buttonCancel)

View In Hierarchy

A simple dialog for the ACME text UI.

Method __init__ Initialize the dialog.
Method action_pop_dialog Close the dialog.
Method compose Build the dialog.
Method on_button_pressed Handle the button press event.
Constant BINDINGS Key bindings for the dialog.
Instance Variable buttonCancel The label of the Cancel button.
Instance Variable buttonOK The label of the OK button.
Instance Variable message The message to display.
Instance Variable width The width of the dialog.
def __init__(self, message: str = 'Really?', buttonOK: str = 'OK', buttonCancel: str = 'Cancel'):

Initialize the dialog.

Parameters
message:strThe message to display.
buttonOK:strThe label of the OK button.
buttonCancel:strThe label of the Cancel button.
def action_pop_dialog(self):

Close the dialog.

def compose(self) -> ComposeResult:

Build the dialog.

Yields
The dialog content.
def on_button_pressed(self, event: Button.Pressed):

Handle the button press event.

Parameters
event:Button.PressedThe button press event.
BINDINGS: list =

Key bindings for the dialog.

Value
[('escape', 'pop_dialog', 'Close')]
buttonCancel =

The label of the Cancel button.

buttonOK =

The label of the OK button.

message =

The message to display.

width =

The width of the dialog.