Package peppy :: Package lib :: Module userparams :: Class ChoiceParam
[frames] | no frames]

Class ChoiceParam

      object --+        
               |        
debug.debugmixin --+    
                   |    
               Param --+
                       |
                      ChoiceParam

Parameter that is restricted to a string from a list of choices.

A Choice control is its user interface, and the currently selected string is used as the value.

Instance Methods
 
__init__(self, keyword, choices, default=None, help='', **kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
getCtrl(self, parent, initial=None)
Create and editing control.
 
setValue(self, ctrl, value)
Populate the control given the user value.
 
getValue(self, ctrl)
Get the user value from the control.

Inherited from Param: OnCallback, __str__, getLabel, isSettable, isVisible, processCallback, setCallback, setInitialState, setValueWithoutCallback, textToValue, valueToText

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Methods

Inherited from debug.debugmixin: dprint

Class Variables
  callback_event = wx.EVT_CHOICE

Inherited from Param: default

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

__init__(self, keyword, choices, default=None, help='', **kwargs)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getCtrl(self, parent, initial=None)

 

Create and editing control.

Given the parent window, create a user interface element to edit the param.

Overrides: Param.getCtrl
(inherited documentation)

setValue(self, ctrl, value)

 

Populate the control given the user value.

If any conversion is needed to show the user value in the control, do it here.

Overrides: Param.setValue
(inherited documentation)

getValue(self, ctrl)

 

Get the user value from the control.

If the control doesn't automatically return a value of the correct type, convert it here.

Overrides: Param.getValue
(inherited documentation)