Package wx :: Package lib :: Package masked :: Module maskededit :: Class MaskedEditMixin

[frames | no frames]

## Class MaskedEditMixin

Known Subclasses:
  `BaseMaskedComboBox`, `BaseMaskedTextCtrl`

This class allows us to abstract the masked edit functionality that could be associated with any text entry control. (eg. wx.TextCtrl, wx.ComboBox, etc.) It forms the basis for all of the lib.masked controls.

Method Summary
| ``__init__`(self, name, **kwargs)` This is the "constructor" for setting up the mixin variable parameters for the composite class.
| ``ClearValue`(self)` Blanks the current control value by replacing it with the default value.
| ``GetCtrlParameter`(self, paramname)` Routine for retrieving the value of any given parameter
| ``GetFieldParameter`(self, field_index, paramname)` Routine provided for getting a parameter of an individual field.
| ``GetMaskParameter`(self, paramname)` old name for the GetCtrlParameters function (DEPRECATED)
| ``GetPlainValue`(self, candidate)` Returns control's value stripped of the template text.
| ``IsDefault`(self, value)` Returns True if the value specified (or the value of the control if not specified) is equal to the default value.
| ``IsEmpty`(self, value)` Returns True if control is equal to an empty value.
| ``IsValid`(self, value)` Indicates whether the value specified (or the current value of the control if not specified) is considered valid.
| ``SetCtrlParameters`(self, **kwargs)` This public function can be used to set individual or multiple masked edit parameters after construction.
| ``SetFieldParameters`(self, field_index, **kwargs)` Routine provided to modify the parameters of a given field.
| ``SetMaskParameters`(self, **kwargs)` old name for the SetCtrlParameters function (DEPRECATED)

Class Variable Summary
`dict` | `valid_ctrl_params` = `{'demo': False, 'foregroundColour': ...`

Method Details

### __init__(self, name='MaskedEdit', **kwargs)
(Constructor)

This is the "constructor" for setting up the mixin variable parameters for the composite class.

### ClearValue(self)

Blanks the current control value by replacing it with the default value.

### GetCtrlParameter(self, paramname)

Routine for retrieving the value of any given parameter

### GetFieldParameter(self, field_index, paramname)

Routine provided for getting a parameter of an individual field.

### GetMaskParameter(self, paramname)

old name for the GetCtrlParameters function (DEPRECATED)

### GetPlainValue(self, candidate=None)

Returns control's value stripped of the template text. plainvalue = MaskedEditMixin.GetPlainValue()

### IsDefault(self, value=None)

Returns True if the value specified (or the value of the control if not specified) is equal to the default value.

### IsEmpty(self, value=None)

Returns True if control is equal to an empty value. (Empty means all editable positions in the template == fillChar.)

### IsValid(self, value=None)

Indicates whether the value specified (or the current value of the control if not specified) is considered valid.

### SetCtrlParameters(self, **kwargs)

This public function can be used to set individual or multiple masked edit parameters after construction. (See maskededit module overview for the list of valid parameters.)

### SetFieldParameters(self, field_index, **kwargs)

Routine provided to modify the parameters of a given field. Because changes to fields can affect the overall control, direct access to the fields is prevented, and the control is always "reconfigured" after setting a field parameter. (See maskededit module overview for the list of valid field-level parameters.)

### SetMaskParameters(self, **kwargs)

old name for the SetCtrlParameters function (DEPRECATED)

Class Variable Details

### valid_ctrl_params

  Type:
    `dict`
  Value:

        {'autoCompleteKeycodes': [],
         'autoformat': '',
         'datestyle': 'MDY',
         'defaultEncoding': 'latin1',
         'demo': False,
         'emptyBackgroundColour': 'White',
         'fields': {},
         'foregroundColour': 'Black',
        ...

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:04 2007 | http://epydoc.sf.net