General Info

An input mask is a special pattern that controls what the user can type into a MaskedInput dialog or input object at run time. The mask can be any combination of regular text characters (literal characters) and special characters. Each special character, as outlined below, represents one "place" in the edit field where the user can type a character. Different special characters allow different kinds of characters to be typed in their "place" by the user. For example, the # character only allows a digit between 0 and 9 to be typed in its place, and the ? character only allows a letter between a and Z.

Note: The special characters you use in the input mask determine what the user will be allowed to type into the edit field.

You can use any literal characters 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 special characters.

Here are the special characters that you can use in an input mask:

Note: Some of these special literal characters adapt to the user's system settings, so they may need to be forced on all systems using "\" before the character.

.

Decimal. (Special literal.) This will be replaced by the character specified as the decimal 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 character (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 (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 character (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 character, 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 character, 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.

&

ANSI Character. 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.

For example, you could create a mask for an IP address:

IP \Address\: ###\.###\.###\.###

...which would appear as:

IP Address:    .   .   .   

(Note that we needed to use the literal escape for the 'A' in Address, the colon, and all three decimal points.)