Specifications
CHAPTER 8 Displaying and Validating Data
Users Guide 279
Keyboard behavior
Note the following about how certain keystrokes behave in edit masks:
• Both Backspace and Shift + Backspace delete the preceding character.
• Delete deletes everything that is selected.
• Non-numeric edit masks treat any characters that do not match the mask
pattern as delimiters.
Also, note certain behavior in Date edit masks:
• Entering zero for the day or month causes the next valid date to be entered.
For example, if the edit mask is DD/MM/YY, typing
00/11/01 results in
01/11/01. You can override this behavior in the development
environment by adding the following lines to your IM.INI file:
[Edit Mask Behaviors]
AutocompleteDates=no
• You cannot use a partial mask, such as dd or mmm, in a date edit mask.
Any mask that does not include any characters representing the year will
be replaced by a mask that does.
• The strings 00/00/00 or 00/00/0000 are interpreted as the
NULL value for
the column.
Using the Mask
pop-up menu
Click the button to the right of the Mask box on the Mask property page to
display a list that contains complete masks that you can click to add to the mask
box, as well as special characters that you can use to construct your own mask.
For example, the menu for a Date edit mask contains complete masks such as
mm/dd/yy and dd/mmm/yyyy. It also has components such as dd and jjj (for a
Julian day). You might use these to construct a mask like dd-mm-yy, typing in
the hyphens as separators.
Using masks with “as
is” characters
You can define a mask that contains “as is” characters that always appear in the
control or column. For example, you might define a numeric mask such as
Rs0000.00 to represent Indian rupees in a currency column.
However, you cannot enter a minus sign to represent negative numbers in a
mask that contains “as is” characters, and the # special character is treated as a
0 character. As a result, if you specify a mask such as ###,##0.00EUR, a value
such as 45,000 Euros would display with a leading zero: 045,000.00EUR. Note
that you must always specify a mask that has enough characters to display all
possible data values. If the mask does not have enough characters, for example
if the mask is #,##0.00 and the value is 45000, the result is unpredictable.