X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..66394199cf03f0e9a3a675fe9829d31463ad38bb:/wxPython/wx/lib/maskedctrl.py?ds=sidebyside diff --git a/wxPython/wx/lib/maskedctrl.py b/wxPython/wx/lib/maskedctrl.py index a3d6413c0a..d5537775ae 100644 --- a/wxPython/wx/lib/maskedctrl.py +++ b/wxPython/wx/lib/maskedctrl.py @@ -6,21 +6,29 @@ # RCS-ID: $Id$ # License: wxWindows license #---------------------------------------------------------------------------- +# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Updated for wx namespace (minor) +# +# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Removed wx prefix +# """

-wxMaskedCtrl is actually a factory function for several types of +MaskedCtrl is actually a factory function for several types of masked edit controls:

-wxMaskedCtrl works by looking for a special controlType +MaskedCtrl works by looking for a special controlType parameter in the variable arguments of the control, to determine what kind of instance to return. controlType can be one of: @@ -34,22 +42,22 @@ controlType can be one of: These constants are also available individually, ie, you can use either of the following:


-    from wxPython.wx.lib.maskedctrl import wxMaskedCtrl, MASKEDCOMBO, MASKEDTEXT, NUMBER
-    from wxPython.wx.lib.maskedctrl import wxMaskedCtrl, controlTypes
+    from wxPython.wx.lib.maskedctrl import MaskedCtrl, MASKEDCOMBO, MASKEDTEXT, NUMBER
+    from wxPython.wx.lib.maskedctrl import MaskedCtrl, controlTypes
 
If not specified as a keyword argument, the default controlType is controlTypes.MASKEDTEXT.

-Each of the above classes has its own unique arguments, but wxMaskedCtrl -provides a single "unified" interface for masked controls. wxMaskedTextCtrl, -wxMaskedComboBox and wxIpAddrCtrl are all documented below; the others have +Each of the above classes has its own unique arguments, but MaskedCtrl +provides a single "unified" interface for masked controls. MaskedTextCtrl, +MaskedComboBox and IpAddrCtrl are all documented below; the others have their own demo pages and interface descriptions. """ -from wxPython.lib.maskededit import wxMaskedTextCtrl, wxMaskedComboBox, wxIpAddrCtrl -from wxPython.lib.maskednumctrl import wxMaskedNumCtrl -from wxPython.lib.timectrl import wxTimeCtrl +from wx.lib.maskededit import MaskedTextCtrl, MaskedComboBox, IpAddrCtrl +from wx.lib.maskednumctrl import MaskedNumCtrl +from wx.lib.timectrl import TimeCtrl # "type" enumeration for class instance factory function @@ -68,7 +76,7 @@ class controlTypes: NUMBER = NUMBER -def wxMaskedCtrl( *args, **kwargs): +def MaskedCtrl( *args, **kwargs): """ Actually a factory function providing a unifying interface for generating masked controls. @@ -80,19 +88,19 @@ def wxMaskedCtrl( *args, **kwargs): del kwargs['controlType'] if controlType == MASKEDTEXT: - return wxMaskedTextCtrl(*args, **kwargs) + return MaskedTextCtrl(*args, **kwargs) elif controlType == MASKEDCOMBO: - return wxMaskedComboBox(*args, **kwargs) + return MaskedComboBox(*args, **kwargs) elif controlType == IPADDR: - return wxIpAddrCtrl(*args, **kwargs) + return IpAddrCtrl(*args, **kwargs) elif controlType == TIME: - return wxTimeCtrl(*args, **kwargs) + return TimeCtrl(*args, **kwargs) elif controlType == NUMBER: - return wxMaskedNumCtrl(*args, **kwargs) + return MaskedNumCtrl(*args, **kwargs) else: raise AttributeError(