Is this correct? It does not look what others have posted in the past?????
Close but not the same.
===================================================================
--- dabo/ui/uiwx/dTextBoxMixin.py (revision 4697)
+++ dabo/ui/uiwx/dTextBoxMixin.py (working copy)
@@ -614,7 +614,10 @@
# Get the string value as reported by wx, which is the
up-to-date
# string value of the control:
if isinstance(self, masked.TextCtrl) and hasattr(self,
"_template"):
- strVal = self.GetPlainValue()
+ if self.UseGetPlain:
+ strVal = self.GetPlainValue()
+ else:
+ strVal = self.GetValue()
else:
strVal = self.GetValue()
Index: dabo/ui/uiwx/dMaskedTextBox.py
===================================================================
--- dabo/ui/uiwx/dMaskedTextBox.py (revision 4697)
+++ dabo/ui/uiwx/dMaskedTextBox.py (working copy)
@@ -65,20 +65,29 @@
"ip": "IPADDR"}
- def __init__(self, parent, properties=None, attProperties=None, *args,
**kwargs):
+ def __init__(self, parent, properties=None, attProperties=None, *args,
**kwargs):
self._baseClass = dMaskedTextBox
+ self.UseGetPlain = False
+ self._useGetPlain = self._extractKey((properties,
attProperties,
kwargs), "UseGetPlain", "")
+ if self._useGetPlain:
+ self.UseGetPlain = self._useGetPlain
+ #kwargs.pop("UseGetPlain")
+
self._mask = self._extractKey((properties, attProperties,
kwargs), "Mask", "")
self._format = self._extractKey((properties, attProperties,
kwargs), "Format", "")
+ self._validregex = self._extractKey((properties, attProperties,
kwargs), "ValidRegex", "")
self._inputCodes =
self._uniqueCodes(self._extractKey((properties,
attProperties, kwargs),
"InputCodes", "_>"))
kwargs["mask"] = self._mask
kwargs["formatcodes"] = self._inputCodes
+ kwargs["validRegex"] = self._validregex
if self._format:
code = self._formatMap.get(self._format.lower(), "")
if code:
kwargs["autoformat"] = code
kwargs.pop("mask")
kwargs.pop("formatcodes")
+ kwargs.pop("validRegex")
kwargs["useFixedWidthFont"] = False
preClass = wx.lib.masked.TextCtrl
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]