ContentsInput Mask
An input mask is a special pattern that controls what the user can type into a MaskedInput dialog or edit field control at run time. The mask can be any combination of regular text characters, called "literals," and special characters, called "placeholders." Each placeholder represents one "place" in the edit field where the user can type a character. Different placeholders allow different kinds of characters to be typed in their "place" by the user. For example, the # placeholder only allows a digit between 0 and 9 to be typed in its place, and the ? placeholder only allows a letter between a and z.
Note: The placeholder characters you use in the input mask determine what the user will be allowed to type into the edit field.
You can use literals to include "normal" characters in the edit field. The user will type "around" the literal characters as they fill in the "blanks" created by the placeholders.
Here are the special characters that you can use in an input mask:
(Note that some of them are special literal characters that adapt to the
user's system settings.)
. |
Decimal placeholder. (Special literal.) This will be replaced by the character specified as the decimal placeholder in the user's international settings. To force a period on all systems, use \. instead. |
, |
Thousands separator. (Special literal.) This will be replaced by the character specified as the thousands separator in the user's international settings. To force a comma on all systems, use \, instead. |
: |
Time separator. (Special literal.) This will be replaced by the character specified as the time separator in the user's international settings. To force a colon on all systems, use \: instead. |
/ |
Date separator. (Special literal.) This will be replaced by the character specified as the date separator in the user's international settings. To force a slash on all systems, use \/ instead. |
# |
Digit placeholder (0-9). For every # in the input mask, the user will only be able to enter a digit between 0 and 9. To display a literal number sign (#), use \# instead. |
A |
Alphanumeric character placeholder (0-9 and a-Z). For every A in the input mask, the user will be able to enter any letter from a to z or any digit between 0 and 9. To display a literal "A", use \A instead. |
? |
Alphabetic placeholder (a-Z). For every ? in the input mask, the user will only be able to enter a letter from a to z. To display a literal question mark, use \? instead. |
> |
Alphabetic placeholder, but forces any letters typed to uppercase (A-Z). For every > in the input mask, the user will only be able to enter a letter from a to z, and whatever letter they type will be converted to uppercase. To display a literal greater-than sign, use \> instead. |
< |
Alphabetic placeholder, but forces any letters typed to lowercase (a-z). For every < in the input mask, the user will only be able to enter a letter from a to z, and whatever letter they type will be converted to lowercase. To display a literal less-than sign, use \< instead. |
& |
Character placeholder. Allows any ANSI character in the following ranges: 32-126 and 128-255. To display a literal ampersand, use \& instead. |
\ |
Literal escape. Use this to make a special character
act as a literal in the input mask. |