traitsui.message module¶
Displays a message to the user as a modal window.
- class traitsui.message.AutoCloseMessage[source]¶
Bases:
HasPrivateTraits
- message = Str("Please wait")¶
The message to be shown:
- time = Float(2.0)¶
The time (in seconds) to show the message:
- class traitsui.message.Message[source]¶
Bases:
HasPrivateTraits
- message = Str()¶
The message to be displayed
- traitsui.message.auto_close_message(message='Please wait', time=2.0, title='Please wait', parent=None)[source]¶
Displays a message to the user as a modal window with no buttons. The window closes automatically after a specified time interval (specified in seconds).
- traitsui.message.error(message='', title='Message', buttons=['OK', 'Cancel'], parent=None)[source]¶
Displays a message to the user as a modal window with the specified title and buttons.
If buttons is not specified, OK and Cancel buttons are used, which is appropriate for confirmations, where the user must decide whether to proceed. Be sure to word the message so that it is clear that clicking OK continues the operation.
- traitsui.message.message(message='', title='Message', buttons=['OK'], parent=None)[source]¶
Displays a message to the user as a model window with the specified title and buttons.
If buttons is not specified, a single OK button is used, which is appropriate for notifications, where no further action or decision on the user’s part is required.