0

In gtk/python, what is the equivalent of MessageBox?

1
  • It should be noted Pygtk is getting replaced with gi.repository Gtk bindings, these answers may not work well for new projects. Commented Nov 2, 2015 at 5:09

2 Answers 2

3

That would be gtk.MessageDialog.

Example:

parent = None
md = gtk.MessageDialog(parent, 
    gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, 
    gtk.BUTTONS_CLOSE, "Download completed")
md.run()
Sign up to request clarification or add additional context in comments.

Comments

3

You can follow this tutorial about message dialogs with PyGTK :

http://zetcode.com/tutorials/pygtktutorial/dialogs

In addition, you can read the documentation about the MessageDialog class.

1 Comment

not surprsing for such an old answer but both links are now dead...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.