Package gui :: Module settingsDialogs :: Class SettingsDialog
[hide private]
[frames] | no frames]

Class SettingsDialog

source code

wx.Dialog --+
            |
           SettingsDialog

A settings dialog.
A settings dialog consists of one or more settings controls and OK and Cancel buttons.
Action may be taken in response to the OK or Cancel buttons.

To use this dialog:
        * Set L{title} to the title of the dialog.
        * Override L{makeSettings} to populate a given sizer with the settings controls.
        * Optionally, override L{postInit} to perform actions after the dialog is created, such as setting the focus.
        * Optionally, extend one or both of L{onOk} or L{onCancel} to perform actions in response to the OK or Cancel buttons, respectively.

@ivar title: The title of the dialog.
@type title: str

Nested Classes [hide private]
  MultiInstanceError
Instance Methods [hide private]
 
__new__(cls, *args, **kwargs) source code
 
__init__(self, parent) source code
 
__del__(self) source code
 
makeSettings(self, sizer)
Populate the dialog with settings controls.
source code
 
postInit(self)
Called after the dialog has been created.
source code
 
onOk(self, evt)
Take action in response to the OK button being pressed.
source code
 
onCancel(self, evt)
Take action in response to the Cancel button being pressed.
source code
Class Variables [hide private]
  _hasInstance = False
  title = ""
Method Details [hide private]

__init__(self, parent)
(Constructor)

source code 
Parameters:
  • parent (wx.Window) - The parent for this dialog; None for no parent.

makeSettings(self, sizer)

source code 

Populate the dialog with settings controls. Subclasses must override this method.

Parameters:
  • sizer (wx.Sizer) - The sizer to which to add the settings controls.

postInit(self)

source code 

Called after the dialog has been created. For example, this might be used to set focus to the desired control. Sub-classes may override this method.

onOk(self, evt)

source code 

Take action in response to the OK button being pressed. Sub-classes may extend this method. This base method should always be called to clean up the dialog.

onCancel(self, evt)

source code 

Take action in response to the Cancel button being pressed. Sub-classes may extend this method. This base method should always be called to clean up the dialog.