def __init__(self, name, designer, parent, ctrlClass): TextCtrlDTC.__init__(self, name, designer, parent, ctrlClass) MaskedDTCMixin.__init__(self) self.editors.update({'Min': PropertyEditors.BITPropEditor, 'Max': PropertyEditors.BITPropEditor, 'Bounds': PropertyEditors.BITPropEditor}) self.mutualDepProps += ['Bounds', 'Min', 'Max']
def __init__(self, name, designer, parent, ctrlClass): TextCtrlDTC.__init__(self, name, designer, parent, ctrlClass) BoolPE = PropertyEditors.BoolConstrPropEdit ColourPE = PropertyEditors.ColourConstrPropEdit self.editors.update({'Min': PropertyEditors.BITPropEditor, 'Max': PropertyEditors.BITPropEditor, 'Limited': BoolPE, 'AllowNone': BoolPE, 'AllowLong': BoolPE, 'DefaultColour': ColourPE, 'OutOfBoundsColour': ColourPE})
def designTimeSource(self, position = 'wx.DefaultPosition', size = 'wx.DefaultSize'): dts = TextCtrlDTC.designTimeSource(self, position, size) dts.update({'value': '0', 'min': 'None', 'max': 'None', 'limited': 'False', 'allow_none': 'False', 'allow_long': 'False', 'default_color': 'wx.BLACK', 'oob_color': 'wx.RED'}) return dts
def constructor(self): constr = TextCtrlDTC.constructor(self) constr.update({ 'Min': 'min', 'Max': 'max', 'Limited': 'limited', 'AllowNone': 'allow_none', 'AllowLong': 'allow_long', 'DefaultColour': 'default_color', 'OutOfBoundsColour': 'oob_color' }) return constr
def writeImports(self): return '\n'.join( (TextCtrlDTC.writeImports(self), 'import wx.lib.intctrl'))
def events(self): return TextCtrlDTC.events(self) + ['IntCtrlEvent']
def constructor(self): constr = TextCtrlDTC.constructor(self) constr.update({'Min': 'min', 'Max': 'max', 'Limited': 'limited', 'AllowNone': 'allow_none', 'AllowLong': 'allow_long', 'DefaultColour': 'default_color', 'OutOfBoundsColour': 'oob_color'}) return constr
def hideDesignTime(self): return TextCtrlDTC.hideDesignTime(self) + \ MaskedDTCMixin.hideDesignTime(self)
def writeImports(self): return '\n'.join( (TextCtrlDTC.writeImports(self), 'import wx.lib.masked.numctrl'))
def events(self): return TextCtrlDTC.events(self) + ['MaskedNumCtrlEvent']
def designTimeSource(self, position = 'wx.DefaultPosition', size = 'wx.DefaultSize'): dts = TextCtrlDTC.designTimeSource(self, position, size) dts['value'] = '0' return dts
def __init__(self, name, designer, parent, ctrlClass): TextCtrlDTC.__init__(self, name, designer, parent, ctrlClass) MaskedDTCMixin.__init__(self)