Defining edit styles
246 DataWindow .NET
The EditMask edit style
Sometimes users need to enter data that has a fixed format. For example, in
North America phone numbers have a 3-digit area code, followed by three
digits, followed by four digits. You can define an edit mask that specifies the
format to make it easier for users to enter values:
Edit masks consist of special characters that determine what can be entered in
the column. They can also contain punctuation characters to aid users.
For example, to make it easier for users to enter phone numbers in the proper
format, specify this mask:
(###) ###-####
At runtime, the punctuation characters display in the box and the cursor jumps
over them as the user types:
Special characters
and keywords
Edit masks use the same special characters as display formats, and there are
special considerations for using numeric, string, date, and time masks.
For information, see “Defining display formats” on page 231.
Semicolons invalid in EditMask edit styles
In a display format, you can use semicolons to separate sections in number,
date, time, and string formats. You cannot use semicolons in an EditMask edit
style.
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.