WinStudio

Input Mask Property

Use the Input Mask property to specify a mask to apply to text entered into a component (such as a telephone number). A mask serves as a template or pattern for text.

Mask Characters

Character  

Description

>

Digit placeholder (0-9). Prompt character is blank. Applies to numeric data types.

9

Digit placeholder (0-9). Prompt character is 0. Applies to numeric data types. Masks with 9 do not support Null values (see Usage Notes).

Z

Digit placeholder (0-9). Prompt character is blank, and the thousands separator is not applied. Applies to numeric data types.

<

Digit placeholder for decimal positions (0-9). Prompt character is blank. Removes non-meaningful trailing zeros. Applies to numeric data types.

#

Digit placeholder (0-9). Prompt character is blank. Applies to numeric data types.

NOTE: This is available only for backward compatibility and generally is not used.

-

Negative sign placeholder. Applies to numeric data types.

.

Decimal placeholder. This character is treated as a literal in the mask. Applies to numeric data types.

The actual character used is the one specified in your regional settings (see Usage Notes).

,

Thousands separator. This character is treated as a literal in the mask. Applies to numeric data types.

The actual character used is the one specified in your regional settings. You do not need to specify a thousands separator.

:

Time separator. This character is treated as a literal in the mask. Applies to the DATE data type.

The actual character used is the one specified as a separator in your regional settings.

A

Alphanumeric character placeholder (0-9 and a-Z). Applies to the CHAR data type.

?

Alphabetic placeholder (a-Z). Applies to the CHAR data type.

X

Alphabetic placeholder that forces characters to capital letters (A-Z). Applies to the CHAR data type.

x

Alphabetic placeholder that forces characters to lowercase letters (a-z). Applies to the CHAR data type.

&

Character placeholder. Valid values for this placeholder are ANSI characters in the following ranges: 32-126 and 128-255. Applies to the CHAR data type.

\

Literal escape.

To treat any of the above characters as literals, use a backslash preceding the character.

[NONE]

Do not apply a mask. See Usage Notes.

Usage Notes

Example

If the mask is set to >>>>>9.99<<< and the user enters 12345.125000, the value displays as 12,345.125. This formatting takes place after the cursor leaves the field.


Related Topics

Underlying Type, WinStudio Component Property