Package gui :: Module wizard :: Class Wiz_page
[hide private]
[frames] | no frames]

Class Wiz_page

source code


The wizard pages to be placed inside the wizard.

To inherit from this class, you must minimally supply the add_contents() method. This method should build the specific GUI elements. The following methods are also designed to be overwritten:

The following methods can be used by add_contents() to create standard GUI elements:

These are described in full detail in their docstrings.

Instance Methods [hide private]
 
Clear(self, key)
Special wizard method for clearing the value of the GUI element corresponding to the key.
source code
unknown
GetValue(self, key)
Special wizard method for getting the value of the GUI element corresponding to the key.
source code
 
ResetChoices(self, key, combo_choices=None, combo_data=None, combo_default=None)
Special wizard method for resetting the list of choices in a ComboBox type element.
source code
 
SetValue(self, key, value)
Special wizard method for setting the value of the GUI element corresponding to the key.
source code
EvtHandler
__init__(self, parent)
Set up the window.
source code
 
_add_title(self, sizer)
Add the title to the dialog.
source code
 
_apply(self, event)
Apply the operation.
source code
wx.Sizer instance
_build_main_section(self, sizer)
Add the main part of the dialog.
source code
 
_free_file_format_reset(self, event)
Reset the free file format widget contents to the original values.
source code
 
_free_file_format_save(self, event)
Save the free file format widget contents into the relax data store.
source code
 
_free_file_format_set_vals(self)
Set the free file format widget contents to the values from the relax data store.
source code
 
add_artwork(self, sizer)
Add the artwork to the dialog.
source code
 
add_contents(self, sizer)
Add the specific GUI elements (dummy method).
source code
 
add_desc(self, sizer, max_y=220)
Add the description to the dialog.
source code
 
boolean_selector(self, sizer, desc, tooltip=None, divider=None, padding=0, spacer=None, default=True)
Build the boolean selector widget for selecting between True and False.
source code
 
chooser(self, sizer, desc, func, choices)
Build the choice element.
source code
wx.ComboBox instance
combo_box(self, sizer, desc, choices=[], evt_fn=None, tooltip=None, divider=None, padding=0, spacer=None, read_only=True)
Build the combo box widget for list selections.
source code
 
element_int(self, key=None, sizer=None, desc=None, tooltip=None, divider=None, padding=0, spacer=None)
Set up the integer element and store it.
source code
 
element_string(self, key=None, element_type='text', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, tooltip=None, divider=None, padding=0, spacer=None, read_only=False)
Set up the string element and store it.
source code
 
element_string_list(self, key=None, element_type='default', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, combo_list_size=None, tooltip=None, divider=None, padding=0, spacer=None)
Set up the element and store it.
source code
 
element_string_list_of_lists(self, key=None, titles=None, sizer=None, desc=None, tooltip=None, divider=None, padding=0, spacer=None)
Set up the element and store it.
source code
wx.TextCtrl
file_selection(self, sizer, desc, message='File selection', wildcard=u'*', style=1, tooltip=None, divider=None, padding=0, spacer=None, preview=True)
Build the file selection element.
source code
 
free_file_format(self, sizer, padding=10, spacer=3, data_cols=False, save=True, reset=True)
Build the free format file settings widget.
source code
wx.TextCtrl instance
input_field(self, sizer, desc, tooltip=None, divider=None, padding=0, spacer=None)
Build the input field widget.
source code
 
on_apply(self)
To be over-ridden if an action is to be performed on hitting the apply button.
source code
 
on_completion(self)
To be over-ridden if an action is to be performed just after executing self.on_execute().
source code
 
on_display(self)
To be over-ridden if an action is to be performed prior to displaying the page.
source code
 
on_display_post(self)
To be over-ridden if an action is to be performed after the execution of the on_display() method.
source code
 
on_execute(self)
To be over-ridden if an action is to be performed just before exiting the page.
source code
 
on_init(self)
To be over-ridden if an action is to be performed when a page is newly displayed.
source code
 
on_next(self)
To be over-ridden if an action is to be performed just before moving to the next page.
source code
 
preview_file(self, event)
Preview a file.
source code
wx.TextCtrl instance
spin_control(self, sizer, desc, default='', min=0, max=100, tooltip=None, divider=None, padding=0, spacer=None)
Build the spin control widget.
source code
wx.TextCtrl instance
spin_id_element(self, sizer, desc='The spin ID string:', choices=['@N', '@C'], default=None, divider=None, padding=0, spacer=None)
Build a special the input field widget.
source code
wx.TextCtrl instance
text(self, sizer, desc, default='', divider=None, padding=0, spacer=None)
Build the input field.
source code

Inherited from wx._windows.Panel: Create, SetFocusIgnoringChildren, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wx._windows.Panel: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Class Variables [hide private]
  art_spacing = 20
  divider = None
hash(x)
  height_desc = 220
  height_element = 27
  image_path = '/data/relax/tags/1.3.16/gui/images/relax.gif'
  main_text = ''
  setup_fail = False
  size_button = (100, 33)
  size_square_button = (33, 33)
  title = ''
Properties [hide private]

Inherited from wx._windows.Panel: thisown

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

Clear(self, key)

source code 

Special wizard method for clearing the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.

GetValue(self, key)

source code 

Special wizard method for getting the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
Returns: unknown
The value that the specific GUI element's GetValue() method returns.

ResetChoices(self, key, combo_choices=None, combo_data=None, combo_default=None)

source code 

Special wizard method for resetting the list of choices in a ComboBox type element.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
  • combo_choices (list of str) - The list of choices to present to the user. This is only used if the element_type is set to 'combo'.
  • combo_data (list) - The data returned by a call to GetValue(). This is only used if the element_type is set to 'combo'. If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • combo_default (str or None) - The default value of the ComboBox. This is only used if the element_type is set to 'combo'.

SetValue(self, key, value)

source code 

Special wizard method for setting the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
  • value (unknown) - The value that the specific GUI element's SetValue() method expects.

__init__(self, parent)
(Constructor)

source code 

Set up the window.

Parameters:
  • parent (wx.object instance) - The parent GUI element.
Returns: EvtHandler
Overrides: object.__init__

_add_title(self, sizer)

source code 

Add the title to the dialog.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.

_apply(self, event)

source code 

Apply the operation.

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

_build_main_section(self, sizer)

source code 

Add the main part of the dialog.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.
Returns: wx.Sizer instance
The sizer object for the main part of the dialog.

_free_file_format_reset(self, event)

source code 

Reset the free file format widget contents to the original values.

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

_free_file_format_save(self, event)

source code 

Save the free file format widget contents into the relax data store.

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

add_artwork(self, sizer)

source code 

Add the artwork to the dialog.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.

add_contents(self, sizer)

source code 

Add the specific GUI elements (dummy method).

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.

add_desc(self, sizer, max_y=220)

source code 

Add the description to the dialog.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.
  • max_y (int) - The maximum height, in number of pixels, for the description.

boolean_selector(self, sizer, desc, tooltip=None, divider=None, padding=0, spacer=None, default=True)

source code 

Build the boolean selector widget for selecting between True and False.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the combo box widget into.
  • desc (str) - The text description.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
  • default (bool) - The default boolean value.

chooser(self, sizer, desc, func, choices)

source code 

Build the choice element.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field into.
  • desc (str) - The text description.
  • func (func) - The function to bind the event to
  • choices (list of str) - The list of choices.

combo_box(self, sizer, desc, choices=[], evt_fn=None, tooltip=None, divider=None, padding=0, spacer=None, read_only=True)

source code 

Build the combo box widget for list selections.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the combo box widget into.
  • desc (str) - The text description.
  • choices (list of str) - The list of choices.
  • evt_fn (func) - The event handling function.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
  • read_only (bool) - A flag which if True means that text cannot be typed into the combo box widget.
Returns: wx.ComboBox instance
The combo box object.

element_int(self, key=None, sizer=None, desc=None, tooltip=None, divider=None, padding=0, spacer=None)

source code 

Set up the integer element and store it.

Parameters:
  • key (str) - The dictionary key to store the element with.
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.

element_string(self, key=None, element_type='text', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, tooltip=None, divider=None, padding=0, spacer=None, read_only=False)

source code 

Set up the string element and store it.

Parameters:
  • key (str) - The dictionary key to store the element with.
  • element_type (str) - The type of GUI element to create. If set to 'text', a wx.TextCtrl element will be used. If set to 'combo', a wx.ComboBox element will be used.
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • combo_choices (list of str) - The list of choices to present to the user. This is only used if the element_type is set to 'combo'.
  • combo_data (list) - The data returned by a call to GetValue(). This is only used if the element_type is set to 'combo'. If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • combo_default (str or None) - The default value of the ComboBox. This is only used if the element_type is set to 'combo'.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
  • read_only (bool) - A flag which if True means that the text of the element cannot be edited.

element_string_list(self, key=None, element_type='default', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, combo_list_size=None, tooltip=None, divider=None, padding=0, spacer=None)

source code 

Set up the element and store it.

Parameters:
  • key (str) - The dictionary key to store the element with.
  • element_type (str) - The type of GUI element to create. If set to 'default', the wx.TextCtrl element with a button to bring up a dialog with ListCtrl will be used. If set to 'combo_list', the special gui.components.combo_list.Combo_list element will be used.
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • combo_choices (list of str) - The list of choices to present to the user. This is only used if the element_type is set to 'combo'.
  • combo_data (list) - The data returned by a call to GetValue(). This is only used if the element_type is set to 'combo'. If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • combo_default (str or None) - The default value of the ComboBox. This is only used if the element_type is set to 'combo'.
  • combo_list_size (int or None) - The number of initial entries in a Combo_list object.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.

element_string_list_of_lists(self, key=None, titles=None, sizer=None, desc=None, tooltip=None, divider=None, padding=0, spacer=None)

source code 

Set up the element and store it.

Parameters:
  • key (str) - The dictionary key to store the element with.
  • titles (list of str) - The titles of each of the elements of the fixed width second dimension.
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.

file_selection(self, sizer, desc, message='File selection', wildcard=u'*', style=1, tooltip=None, divider=None, padding=0, spacer=None, preview=True)

source code 

Build the file selection element.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field into.
  • desc (str) - The text description.
  • message (String) - The file selector prompt string.
  • wildcard (String) - The file wildcard pattern. For example for opening PDB files, this could be "PDB files (*.pdb)|*.pdb;*.PDB".
  • style (long) - The dialog style. To open a single file, set to wx.FD_OPEN. To open multiple files, set to wx.FD_OPEN|wx.FD_MULTIPLE. To save a single file, set to wx.FD_SAVE. To save multiple files, set to wx.FD_SAVE|wx.FD_MULTIPLE.
  • tooltip (str) - The tooltip which appears on hovering over all the GUI elements.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
  • preview (bool) - A flag which if true will allow the file to be previewed.
Returns: wx.TextCtrl
The file selection GUI element.

free_file_format(self, sizer, padding=10, spacer=3, data_cols=False, save=True, reset=True)

source code 

Build the free format file settings widget.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field into.
  • padding (int) - The size of the padding between the wx.StaticBoxSizer border and the internal elements, in pixels.
  • spacer (int) - The horizontal spacing between the elements, in pixels.
  • data_cols (bool) - A flag which if True causes the data and error column elements to be displayed.
  • save (bool) - A flag which if True will cause the save button to be displayed.
  • reset (bool) - A flag which if True will cause the reset button to be displayed.

input_field(self, sizer, desc, tooltip=None, divider=None, padding=0, spacer=None)

source code 

Build the input field widget.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
Returns: wx.TextCtrl instance
The input field object.

on_apply(self)

source code 

To be over-ridden if an action is to be performed on hitting the apply button.

This method will be called when clicking on the apply button.

on_completion(self)

source code 

To be over-ridden if an action is to be performed just after executing self.on_execute().

This method is called just after self.on_execute() has been called

on_display(self)

source code 

To be over-ridden if an action is to be performed prior to displaying the page.

This method will be called by the wizard class method _display_page() just after hiding all other pages but prior to displaying this page.

on_display_post(self)

source code 

To be over-ridden if an action is to be performed after the execution of the on_display() method.

This method will be called by the wizard class method _display_page() just after hiding all other pages but prior to displaying this page.

on_execute(self)

source code 

To be over-ridden if an action is to be performed just before exiting the page.

This method is called when terminating the wizard or hitting the apply button.

on_init(self)

source code 

To be over-ridden if an action is to be performed when a page is newly displayed.

This method will be called by the wizard class method _display_page() at the very end.

on_next(self)

source code 

To be over-ridden if an action is to be performed just before moving to the next page.

This method is called when moving to the next page of the wizard.

preview_file(self, event)

source code 

Preview a file.

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

spin_control(self, sizer, desc, default='', min=0, max=100, tooltip=None, divider=None, padding=0, spacer=None)

source code 

Build the spin control widget.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the spin control widget into.
  • desc (str) - The text description.
  • default (int) - The default value of the control.
  • min (int) - The minimum value allowed.
  • max (int) - The maximum value allowed.
  • tooltip (str) - The tooltip which appears on hovering over the text or spin control.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
Returns: wx.TextCtrl instance
The spin control object.

spin_id_element(self, sizer, desc='The spin ID string:', choices=['@N', '@C'], default=None, divider=None, padding=0, spacer=None)

source code 

Build a special the input field widget.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • choices (list of str) - The list of choices to present to the user.
  • default (str or None) - The default value.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
Returns: wx.TextCtrl instance
The input field object.

text(self, sizer, desc, default='', divider=None, padding=0, spacer=None)

source code 

Build the input field.

Parameters:
  • sizer (wx.Sizer instance) - The sizer to put the input field into.
  • desc (str) - The text description.
  • default (str) - The default text.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
Returns: wx.TextCtrl instance
The input field object.