More Validator oddities
Manuel Martín
mmartin at ceyd.es
Tue Apr 3 12:26:16 PDT 2007
>Thanks. It looks like that code manually calls the validator?
Not in the sample. But like any other wxValidator, you can call Validate().
wxNumberValidator calls Validate() itself when loosing focus if corresponding flag is active.
See wxNumberValidator.htm
The sample allows to:
- see some samples
- format & unformat
- validate
For testing "validate"
+ type a "style" (most left & down textctrl)
+ check flags (7 flags available)
+ press "use style and checked flags"
+ try typing or pasting & typing on "Validator window"
+ press buttons to transfer to/from validator's string var
>
>Manuel Martín wrote:
>> >Now, the validators work when I'm typing in, they limit what I can
>> >input.
>> >But, if I paste something in, the validator doesnt fire, it allows the
>> >paste to
>> >happen.
>>
>>
>> Take a look at
>> ftp://biolpc22.york.ac.uk/pub/contrib/formatvalidator
>>
>> HTH
>> Manolo
More information about the wx-users
mailing list