RAD Studio (Common)
ContentsIndex
PreviousUpNext
Input Mask editor

Use the Input Mask editor to define an edit box that limits the user to a specific format and accepts only valid characters. For example, in a data entry field for telephone numbers you might define an edit box that accepts only numeric input. If a user then tries to enter a letter in this edit box, your application will not accept it. 

Use the Input Mask editor to edit the EditMask property of the MaskEdit component.

To open the Input Mask editor:

  1. Place a MaskEdit component on the form.
  2. With that component selected, do one of the following:
  • Click the ellipsis button in the Value column for the EditMask property.
  • Double-click the Value column for the EditMask property.

Define your own masks for the edit box. You can use special character to specify the mask; for a listing of those characters, see the EditMask property.  

The mask consists of three fields separated by semicolons. The three fields are:

  • The mask itself; you can use predefined masks or create your own.
  • The character that determines whether or not the literal characters of the mask are saved as part of the data.
  • The character used to represent a blank in the mask.

Specify a character to use as a blank in the mask. Blanks in a mask are areas that require user input.  

This edit box changes the third field of your edit mask.

Check to store the literal characters from the edit mask as part of the data. This option affects only the Text property of the MaskEdit component. If you save data using the EditText property, literal characters are always saved.  

This check box toggles the second field in your edit mask.

Use Test Input to verify your mask. This edit box displays the edit mask as it will appear on the form.

Select a predefined mask to use in the MaskEdit component. When you select a mask from this list, the product places the predefined mask in the Input Mask edit box and displays a sample in the Test Input edit box. To display masks appropriate to your country, choose the Masks button.

Choose Masks to display the Open Mask File dialog box, where you choose a file containing the sample masks shown in the Sample Masks list box.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!