Mask: String;
The Mask property determines the input field mask that specifies the available data during input.
The characters of the mask are specified in the positions used for the data input. These positions are determined in the template using the character specified in the PlaceholderChar property.
The characters that determine the available data during input:
Character | Mask value |
a/A | Letters and numbers can be input. |
d/D | Only numbers can be input. |
c/C | Only letters can be input. |
Executing the example requires a form, a button named Button1 on it and the MaskEdit component named MaskEdit1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
MaskEdit1.MaskEnabled := True;
MaskEdit1.Mask := " dd dd ddddd";
MaskEdit1.InputTemplate := "Telephone:8-9__-__-_____";
End Sub Button1OnClick;
After executing the example the template to enter the cell phone number is set for the MaskEdit1 component by clicking the button.
See also: