Version: 3.0.3

Detailed Description

These are the window validators, used for filtering and validating user input.

Related Overviews: wxValidator Overview


class  wxNumValidator< T >
 wxNumValidator is the common base class for numeric validator classes. More...
class  wxIntegerValidator< T >
 Validator for text entries used for integer entry. More...
class  wxFloatingPointValidator< T >
 Validator for text entries used for floating point numbers entry. More...
class  wxGenericValidator
 wxGenericValidator performs data transfer (but not validation or filtering) for many type of controls. More...
class  wxValidator
 wxValidator is the base class for a family of validator classes that mediate between a class of control, and application data. More...
class  wxTextValidator
 wxTextValidator validates text controls, providing a variety of filtering behaviours. More...


enum  wxNumValidatorStyle {
 Bit masks used for numeric validator styles. More...

Enumeration Type Documentation

Bit masks used for numeric validator styles.

A combination of these flags can be used when creating wxIntegerValidator and wxFloatingPointValidator objects and with their SetStyle() methods.

Category:  Validators

Indicates absence of any other flags.

This value corresponds to the default behaviour.


Use thousands separators in the numbers.

When this style is used, numbers are formatted using the thousands separators after validating the user entry (if the current locale uses the thousands separators character).


Show a value of zero as an empty string.

With this style a value of zero in the associated variable is translated to an empty string and an empty value of the control is translated to a value of zero.


Remove trailing zeroes from the fractional part of the number.

This style can only be used with wxFloatingPointValidator and indicates that trailing zeroes should be removed from the control text when it is validated. By default, as many zeroes as needed to satisfy the precision used when creating the validator will be appended.

For example, without this style a wxFloatingPointValidator with a precision 3 will show the value of 1.5 as "1.500" after validation. With this style, the value will be shown as just "1.5" (while a value of e.g. 1.567 will still be shown with all the three significant digits, of course).