MessageBox

Provides a generic message box with reasonable defaults. Text is displayed in a label with a wraplength of 40. The set of buttons is configurable.

Base Classes

Methods

__init__(self, txt, buttons, default)

   def __init__(self, txt, buttons = ['OK'], default = 0):

Creates a message box with the given message. Buttons can specify a list or tuple of the names of the buttons. The index of the name will be the value returned by the show() method. default indicates the index of the default pushbutton.

buttonPressed(self, index)

   def buttonPressed(self, index):

Function called when a box button is pressed.

show(self)

   def show(self):

Displays the message box modally. Returns the button that was pressed.