class ModalDialog(Dialog)

The ModalDialog class is a subclass of Dialog designed for modal dialogs. It has a default style of 'modal_dialog' and provides facilities for presenting the dialog modally.

While a ModalDialog is active, interaction with other parts of the application is prevented. Other windows cannot be activated, application-wide menu commands other than those used by the dialog itself are not enabled, and unhandled events and messages are not forwarded to the application.

Constructor

ModalDialog(style = 'modal_dialog',
  closable = False, resizable = False, zoomable = False,
  movable = default, hidabledefault)
Constructs a ModalDialog with the specified options. The default values for the movable and hidable options are platform-dependent.

Methods

present()
Present the dialog modally. The dialog is shown and a nested event loop is entered which prevents interaction with any other part of the application. This method retains control until the dialog's dismiss() method is called, at which time it returns with the value passed to dismiss().

Note: The dialog is not automatically hidden when the present() method returns.
dismiss(result = 0)
If the dialog is being presented modally, causes the present() method to return with the given result as its return value.
---