[NTB] RE: Mask Characters
- This is from one of the READTHIS.TXT contained in one of the 4.5 betas.
Hope it helps:
MASKED INPUT CONTROL:
Use the mask to restrict the characters a user can enter into the masked
edit control to valid characters and formats. If the user attempts to
enter an invalid character, the edit control does not accept the
character. Validation is performed on a character-by-character basis.
A mask consists of three fields with semicolons separating the fields.
The first part of the mask is the mask itself. The second part is the
character that determines whether the literal characters of a mask are
saved as part of the data. The third part of the mask is the character
used to represent unentered characters in the mask.
These are the special characters used in the first field of the mask:
Character Meaning in mask
! If a ! character appears in the mask, optional characters are
represented in the EditText as leading blanks. If a ! character is not
present, optional characters are represented in the EditText as trailing
> If a > character appears in the mask, all characters that follow arein uppercase until the end of the mask or until a < character is
< If a < character appears in the mask, all characters that follow are
in lowercase until the end of the mask or until a > character is
<> If these two characters appear together in a mask, no case checking
is done and the data is formatted with the case the user uses to enter
\ The character that follows a \ character is a literal character. Use
this character to use any of the mask special characters as a literal in
L The L character requires an alphabetic character only in this
position. For the US, this is A-Z, a-z.
l The l character permits only an alphabetic character in this
position, but doesn't require it.
A The A character requires an alphanumeric character only in this
position. For the US, this is A-Z, a-z, 0-9.
a The a character permits an alphanumeric character in this position,
but doesn't require it.
C The C character requires an arbitrary character in this position.
c The c character permits an arbitrary character in this position, but
doesn't require it.
0 The 0 character requires a numeric character only in this position.
9 The 9 character permits a numeric character in this position, but
doesn't require it.
# The # character permits a numeric character or a plus or minus sign in
this position, but doesn't require it.
: The : character is used to separate hours, minutes, and seconds in
times. If the character that separates hours, minutes, and seconds is
different in the regional settings of the Control Panel utility on your
computer system, that character is used instead.
/ The / character is used to separate months, days, and years in dates.
If the character that separates months, days, and years is different in
the regional settings of the Control Panel utility on your computer
system, that character is used instead.
; The ; character is used to separate the three fields of the mask.
_ The _ character automatically inserts spaces into the text. When the
user enters characters in the field, the cursor skips the _ character.
Any character that does not appear in the preceding table can appear in
the first part of the mask as a literal character. Literal characters
must be matched exactly in the edit control. They are inserted
automatically, and the cursor skips over them during editing. The
special mask characters can also appear as literal characters if
preceded by a backslash character (\).
The second field of the mask is a single character that indicates
whether literal characters from the mask should be included as part of
the text for the edit control. For example, the mask for a telephone
number with area code could be the following string:
The 0 in the second field indicates that the Text property for the edit
control would consist of the 10 digits that were entered, rather than
the 14 characters that make up the telephone number as it appears in the
A 0 in the second field indicates that literals should not be included,
any other character indicates that they should be included.
The third field of the mask is the character that appears in the edit
control for blanks (characters that have not been entered). By default,
this is the same as the character that stands for literal spaces. The
two characters appear the same in an edit window. However, when a user
edits the text in a masked edit control, the cursor selects each blank
character in turn, and skips over the space character.
When working with multibyte character sets, such as Japanese shift-JIS,
each special mask character represents a single byte. To specify
double-byte characters using the L, l, A, a, C, or c specifiers, the
mask characters must be doubled as well. For example, LL would represent
two single-byte alphabetic characters or a one double-byte character.
Only single-byte literal characters are supported.
Senior Software Engineer
Sage Software, Inc.
> -----Original Message-----______________________________________________________________________
> From: Michael Slack [mailto:mslack@...]
> Sent: Wednesday, September 30, 1998 3:51 PM
> To: email@example.com
> Subject: [NTB] Mask Characters
> Hi Folks!
> I have searched high and low in the NoteTab Pro V4.5 for a
> listing of the mask characters used in the following context:
> (From the help file itself.)
> Simple field with input mask:
> Later in the same help file it says:
> M - mask placed between quotes (see next topic for a list of
> mask characters).
> The "next topic" is quite elusive... Does anyone
> have this list of mask characters???
> Thanks in advance and kudos to the author of this fine product!
> - M -
> Free e-mail group hosting at http://www.eGroups.com/
> Subscribe, unsubscribe, opt for a daily digest, or start a new e-group
> at http://www.eGroups.com -- Free Web-based e-mail groups.
Subscribe, unsubscribe, opt for a daily digest, or start a new e-group
at http://www.eGroups.com -- Free Web-based e-mail groups.