class Dialog(Window)


The Dialog class is a subclass of Window designed for use as a dialog box. It provides facilities for defining default and cancel buttons that are activated by keyboard equivalents.

A Dialog differs from a Window in having a default style of 'nonmodal_dialog', and by default (if possible on the platform) not being closable, zoomable or resizable. These options can be overridden in the constructor call.

On platforms which display a menu bar at the top of each window, a Dialog does not normally have a menu bar. Menu items are still available by their keyboard equivalents while the Dialog is active, however.

Constructor

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

Properties

default_button
The Button that is to be activated in response to the platform's keyboard equivalent for the default button of a dialog. Setting this property also causes the button's default property to be set to true, so that the button will be displayed as a default button.
cancel_button
The Button that is to be activated in response to the platform's keyboard equivalent for the cancel button of a dialog. Setting this property also causes the button's cancel property to be set to true, so that the button will be displayed as a cancel button.