Package gui :: Module message :: Class Question
[hide private]
[frames] | no frames]

Class Question

source code


Question box GUI element for obtaining a yes/no response from the user.

Instance Methods [hide private]
bool
__init__(self, msg, parent=None, title='', size=(350,125), default=False)
A generic question box.
source code
int
ShowModal(self)
Replacement ShowModal method.
source code
 
handler_close(self, event)
Event handler for the close window action.
source code
 
no(self, event)
No selection.
source code
 
yes(self, event)
Yes selection.
source code
Class Variables [hide private]
  border = 10
  spacer_button = 10
  spacer_main = 20
  height_button = 30
  width_button = 100
Method Details [hide private]

__init__(self, msg, parent=None, title='', size=(350,125), default=False)
(Constructor)

source code 

A generic question box.

Parameters:
  • msg (str) - The text message to display.
  • parent (wx.object instance) - The parent wx object.
  • title (str) - The window title.
  • default (bool) - If True, the default button will be 'yes', otherwise it will be 'no'.
Returns: bool
The answer.

ShowModal(self)

source code 

Replacement ShowModal method.

Returns: int
The answer to the question, either wx.ID_YES or wx.ID_NO.

handler_close(self, event)

source code 

Event handler for the close window action.

Parameters:
  • event (wx event) - The wx event.

no(self, event)

source code 

No selection.

Parameters:
  • event (wx event) - The wx event.

yes(self, event)

source code 

Yes selection.

Parameters:
  • event (wx event) - The wx event.