Re: TMaskEdit


[ DelphiLand Discussion Forum ]

Posted by webmaster Guido on October 18, 2002 at 19:06:38:

In Reply to: TMaskEdit posted by Eric Lee on October 18, 2002 at 09:52:21:

: How to set a TMaskEdit field for numbers only. The length of the field can be 1 to 5.
--------

In the property EditMask you enter a string of characters for the mask. For numbers, the following characters are used:
0 requires a numeric character in this position;
9 permits a numeric character in this position, but doesn't require it;
# permits a numeric character or a plus or minus sign in this position, but doesn't require it.

Examples:
use 00000 for exactly five numeric characters;
use 99999 for zero to five numeric characters;
use 09999 for one to five numeric characters;
use #09999 for one to five numeric characters with an optional plus or minus sign in from of them, or 6 numerical characters without any sign.

A complete list of masking characters can be found in Delphi's Help. Here's a trick: put a TMaskEdit on your form, next, in the Object Inspector, click on the property EditMask and press key F1... and automagically, the Help system opens with the info about this property!


Related Articles and Replies:


[ DelphiLand Discussion Forum ]