A stricter numeric text validator?

Yoav Gonen YoavG at HumanEyes.com
Thu Aug 16 00:01:47 PDT 2007


What we did was define a wxNumericTextValidator with the following
c-tor:

wxNumericTextValidator(bool intOnly, bool rangeIsInclusive, double
minVal, double maxVal, wxString* val);

This is enough for our needs, but it can be improved. Using templates
indeed makes sense.
Yoav


-----Original Message-----
From: H [mailto:H at h.com] 
Sent: Wednesday, August 15, 2007 7:11 PM
To: wx-users at lists.wxwidgets.org
Subject: Re: A stricter numeric text validator?

I really like to have an integer-only text validator. And I also need a 
range (open or closed) quite often. I have written my own validators but

I prefer to use an "official" one.
BTW: I implemented them as templates because of the various numeric 
types (signed and unsigned, short, long and long long). How did you do 
it? This is also the reason why I did not try to submit them because I 
have not found any real template code in wxWidgets, yet.

Hartwig






More information about the wx-users mailing list