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

Class BoolParam

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

Boolean parameter that displays a checkbox as its user interface.

Text uses one of 'yes', 'true', or '1' to represent the bool True, and anything else to represent False.

Instance Methods
 
getCtrl(self, parent, initial=None)
Return a checkbox control
 
textToValue(self, text)
Return True if one of the yes values, otherwise False
 
valueToText(self, value)
Convert the boolean value to a string
 
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, __init__, __str__, getLabel, isSettable, isVisible, processCallback, setCallback, setInitialState, setValueWithoutCallback

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

Class Methods

Inherited from debug.debugmixin: dprint

Class Variables
  default = False
  callback_event = wx.EVT_CHECKBOX
  yes_values = ['yes', 'true', '1']
  no_values = ['no', 'false', '0']

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

getCtrl(self, parent, initial=None)

 

Return a checkbox control

Overrides: Param.getCtrl

textToValue(self, text)

 

Return True if one of the yes values, otherwise False

Overrides: Param.textToValue

valueToText(self, value)

 

Convert the boolean value to a string

Overrides: Param.valueToText

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)