PyGTK MessageDialog Class - PyGTK

What is PyGTK MessageDialog Class?

A Messagedialog widget is a Dialog window arranged to show an image on behalf of the type of message, i.e., error, question, or some informational text. A MessageDialog object is declared by using the following constructor –

The resulting predefined message types are used to configure message dialog −

gtk.MESSAGE_INFO

This is an informational message

gtk.MESSAGE_WARNING

This is a nonfatal warning message

gtk.MESSAGE_QUESTION

This question requires a choice

gtk.MESSAGE_ERROR

This is a fatal error message

A set of predefined button sets are also available for use.

gtk.BUTTONS_NONE

No buttons at all

gtk.BUTTONS_OK

This is an OK button

gtk.BUTTONS_CLOSE

This is a Close button

gtk.BUTTONS_CANCEL

This is a Cancel button

gtk.BUTTONS_YES_NO

These are the Yes and No buttons

gtk.BUTTONS_OK_CANCEL

These are OK and Cancel buttons

When the MessageBox menu item is activated, the following callback function is called and a message box pops up as an output.

The above function will produce the ensuing output –

error_message

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

PyGTK Topics