OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Member Function IsValidInput

When an edit control object recognizes a keystroke event intended for it, it calls its validator's TValidator::IsValidInput method to ensure that the entered character is a valid entry.

By default, IsValidInput methods always return true, meaning that all keystrokes are acceptable, but some derived validators override IsValidInput to filter out unwanted keystrokes.

For example, range validators, which are used for numeric input, return true from IsValidInput only for numeric digits and the characters '+' and '-'. IsValidInput takes two parameters, as shown in the following syntax statement:

virtual bool IsValidInput(char far* str, bool suppressFill);

The first parameter, str, points to the current input text being validated. The second parameter is a Boolean value indicating whether the validator should apply filling or padding to the input string before attempting to validate it.

TPXPictureValidator is the only standard validator object that uses the second parameter.

See Also