CHAPTER 8 Displaying and Validating Data
DataWindow Designer User’s Guide 247
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 DW.INI file:
[Edit Mask Behaviors]
AutocompleteDates=no
• 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.
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.
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.
The preferred method of creating a currency editmask is to use the predefined
[currency(7)] - International mask. You can change the number in
parentheses, which is the number of characters in the mask including two
decimal places. When you use this mask, DataWindow Designer uses the
currency symbol and format defined in the regional settings section of the
Windows control panel. You can enter negative values in a column that uses a
currency mask.