RAD Studio VCL Reference
|
Indicates whether a particular character is valid for the field.
function IsValidChar(InputChar: Char): Boolean; virtual;
virtual __fastcall Boolean IsValidChar(Char InputChar);
Call IsValidChar to determine if the character specified by InputChar can appear in the text representation of the field's value. Many data-aware controls use IsValidChar to check characters entered by the user to determine if they are valid. IsValidChar returns true if InputChar can appear in the field. IsValidChar returns false if InputChar is not a valid character for the field type.
The valid characters for a field object are given by the ValidChars property. By default, field objects accept all characters as valid. For each DataType that restricts the set of valid characters, the default valid characters are listed below:
Valid characters | |
ftSmallint |
Digits 0 to 9, plus sign (+), and minus sign (-). |
ftWord |
Digits 0 to 9, plus sign (+), and minus sign (-) |
ftAutoInc |
Digits 0 to 9, plus sign (+), and minus sign (-) |
ftInteger |
Digits 0 to 9, plus sign (+), and minus sign (-) |
ftLargeInt |
Digits 0 to 9, plus sign (+), and minus sign (-) |
ftCurrency |
Digits 0 to 9, plus sign (+), minus sign (-), the letter E (E or e) and the decimal separator from the regional settings in the Windows control panel. |
ftFloat |
Digits 0 to 9, plus sign (+), minus sign (-), the letter E (E or e) and the decimal separator from the regional settings in the Windows control panel |
ftBCD |
Digits 0 to 9, plus sign (+), minus sign (-), and the decimal separator from the regional settings in the Windows control panel. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|