enaml.stdlib.message_box
Functions
Display a simple about box with title and text. |
|
Display an critical message box with title and text. |
|
Display an information message box with title and text. |
|
Display a question message box with title and text. |
|
Display a warning message box with title and text. |
Classes
""" A dialog which provides the functionality of a message box. |
- enaml.stdlib.message_box.about(parent, title, text)
Display a simple about box with title and text.
- enaml.stdlib.message_box.critical(parent, title, text, buttons=None)
Display an critical message box with title and text.
On Windows, the dialog will display the stock critical icon.
- Parameters:
- Returns:
result – The dialog button object which was clicked, or None if the dialog was closed without clicking a dialog button.
- Return type:
DialogButton or None
- enaml.stdlib.message_box.information(parent, title, text, buttons=None)
Display an information message box with title and text.
On Windows, the dialog will display the stock information icon.
- Parameters:
- Returns:
result – The dialog button object which was clicked, or None if the dialog was closed without clicking a dialog button.
- Return type:
DialogButton or None
- enaml.stdlib.message_box.question(parent, title, text, buttons=None)
Display a question message box with title and text.
On Windows, the dialog will display the stock question icon.
- Parameters:
- Returns:
result – The dialog button object which was clicked, or None if the dialog was closed without clicking a dialog button.
- Return type:
DialogButton or None
- enaml.stdlib.message_box.warning(parent, title, text, buttons=None)
Display a warning message box with title and text.
On Windows, the dialog will display the stock warning icon.
- Parameters:
- Returns:
result – The dialog button object which was clicked, or None if the dialog was closed without clicking a dialog button.
- Return type:
DialogButton or None
- class enaml.stdlib.message_box.MessageBox(parent=None, **kwargs)
Bases:
Dialog
“”” A dialog which provides the functionality of a message box.
This element uses the task dialog components to assemble a dialog based on the provided attribute values.
Simple versions of this dialog can be launched with the functions ‘about’, ‘critical’, ‘information’, ‘question’, and ‘warning’ defined in this module. These functions are intended to be simple and do not provide all options available on this element. If full control over the message box is needed, use this element directly.
- image
The image to use for the icon in the dialog body icon area. If this is not provided, no icon area will be generated.
- Type:
Image, optional
- text
The text to display in the instruction area of the dialog. This should always be provided.
- Type:
basetring
- details
Extra information to show in the details area. This string will be provided to an Html area, and can therefore contain html markup. If this is provided, the details area will be togglable via a check box placed in the dialog command area.
- Type:
str, optional
- buttons
The list of DialogButton objects which define the buttons to display in a DialogButtonBox which is placed in the dialog command area. This should always be provided.
- Type:
- """
- __reduce_ex__(proto)
An implementation of the reduce protocol.
This method creates a reduction tuple for enamldef instances. It is not part of the public Enaml api.
- activated
An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.