On Saturday 15 November 2008 06:19:06 pm Ed Leafe wrote:
> On Nov 15, 2008, at 6:28 PM, johnf wrote:
> > Does anyone have an example of to use validRegex and dMaskTextBox.
> > I have
> > tried many ways without any success. As I read the doc's all that is
> > required is
> > (InputCodes='V', validRegex="1|2") but it does nothing.
>
> No, the docs are pretty thin for this control. I just copied the docs
> in dMaskedTextBox from the underlying class, and googling around
> doesn't turn up anything. You might try asking on the wxPython list;
> if you find out how to use it, please update the docstrings for this
> class.
>
>
> -- Ed Leafe
After importing the correct modules I tried the following and it works.
ipaddr3 = masked.Ctrl( self, -1,
controlType = masked.controlTypes.IPADDR,
mask=" 10. #.###.###")
ipaddr3.SetFieldParameters(0, validRegex="1|2",validRequired=False )
# requires entry to match or not allowed
The above comes from the wxpython demo. And the following also works
poText = dabo.ui.dMaskedTextBox(self, Mask=" 10. #.###.###",validRegex="1|
2",validRequired=False,RegID='CropsluPOLineID',DataSource='public.aglots',DataField='fk_popord')
But the above required a Mask and masks are positional. In the Doc's it
suggest that I can use InputCodes='V' and just use the regular expression to
filter the input to the control. But I can't get that to work in any manner.
I will send an email to the wxpython guys.
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]