+ self._PostInit(style=style, setupEventHandling=setupEventHandling,
+ name=name, value=value, **kwargs)
+
+
+ def _PostInit(self, style=wx.CB_DROPDOWN,
+ setupEventHandling = True, ## setup event handling by default):
+ name = "maskedComboBox", value='', **kwargs):
+
+ # This is necessary, because wxComboBox currently provides no
+ # method for determining later if this was specified in the
+ # constructor for the control...
+ self.__readonly = style & wx.CB_READONLY == wx.CB_READONLY
+
+ if not hasattr(self, 'controlInitialized'):
+
+ self.controlInitialized = True ## must have been called via XRC, therefore base class is constructed
+ if not kwargs.has_key('choices'):
+ choices=[]
+ kwargs['choices'] = choices ## set up maskededit to work with choice list too
+ self._choices = []
+
+ ## Since combobox completion is case-insensitive, always validate same way
+ if not kwargs.has_key('compareNoCase'):
+ kwargs['compareNoCase'] = True
+
+ MaskedEditMixin.__init__( self, name, **kwargs )
+
+ self._choices = self._ctrl_constraints._choices
+## dbg('self._choices:', self._choices)
+
+ if self._ctrl_constraints._alignRight:
+ choices = [choice.rjust(self._masklength) for choice in choices]
+ else:
+ choices = [choice.ljust(self._masklength) for choice in choices]
+ wx.ComboBox.Clear(self)
+ wx.ComboBox.AppendItems(self, choices)
+
+