Table Of Contents

Previous topic

combobox

Next topic

ComboBox

This Page

phoenix_title BaseMaskedComboBox

Base class for generic masked edit comboboxes; allows auto-complete of values. It is not meant to be instantiated directly, but rather serves as a base class for any subsequent refinements.


class_hierarchy Inheritance Diagram

Inheritance diagram for class BaseMaskedComboBox

Inheritance diagram of BaseMaskedComboBox


method_summary Methods Summary

__init__  
Append This base control function override is necessary so the control can keep track
AppendItems AppendItems() is handled in terms of Append, to avoid code replication.
Clear This base control function override is necessary so the derived control can
Cut This function redefines the externally accessible .Cut to be
GetMark  
IsEmpty  
OnWindowDestroy  
Paste This function redefines the externally accessible .Paste to be
Refresh This function redefines the externally accessible .Refresh() to
SetFont Set the font, then recalculate control size, if appropriate.
SetSelection Necessary override for bookkeeping on choice selection, to keep current value
SetValue This function redefines the externally accessible .SetValue to be
Undo This function defines the undo operation for the control. (The default

api Class API



class BaseMaskedComboBox(ComboBox, MaskedEditMixin)

Base class for generic masked edit comboboxes; allows auto-complete of values. It is not meant to be instantiated directly, but rather serves as a base class for any subsequent refinements.


Methods



__init__(self, parent, id=-1, value = '', pos = DefaultPosition, size = DefaultSize, choices =[], style = CB_DROPDOWN, validator = DefaultValidator, name = "maskedComboBox", setupEventHandling = True, **kwargs)


Append(self, choice, clientData=None)

This base control function override is necessary so the control can keep track of any additions to the list of choices, because wx.ComboBox doesn’t have an accessor for the choice list. The code here is the same as in the SetParameters() mixin function, but is done for the individual value as appended, so the list can be built incrementally without speed penalty.



AppendItems(self, choices)

AppendItems() is handled in terms of Append, to avoid code replication.



Clear(self)

This base control function override is necessary so the derived control can keep track of any additions to the list of choices, because wx.ComboBox doesn’t have an accessor for the choice list.



Cut(self)

This function redefines the externally accessible .Cut to be a smart “erase” of the text in question, so as not to corrupt the masked control. NOTE: this must be done in the class derived from the base wx control.



GetMark(self)


IsEmpty(*args, **kw)


OnWindowDestroy(self, event)


Paste(self)

This function redefines the externally accessible .Paste to be a smart “paste” of the text in question, so as not to corrupt the masked control. NOTE: this must be done in the class derived from the base wx control.



Refresh(self)

This function redefines the externally accessible .Refresh() to validate the contents of the masked control as it refreshes. NOTE: this must be done in the class derived from the base wx control.



SetFont(self, *args, **kwargs)

Set the font, then recalculate control size, if appropriate.



SetSelection(self, index)

Necessary override for bookkeeping on choice selection, to keep current value current.



SetValue(self, value)

This function redefines the externally accessible .SetValue to be a smart “paste” of the text in question, so as not to corrupt the masked control. NOTE: this must be done in the class derived from the base wx control.



Undo(self)

This function defines the undo operation for the control. (The default undo is 1-deep.)