高分请教关于MaskEdit的问题,在线等待!!

delphilove 2003-08-20 03:19:55
在MaskEdit的示例中有如下Mask:
00000\-9999;1;_
!99/99/00;1;_
想请问以下几个问题:
1.上面的0和9有什么区别?
2.第二个mask中的!是什么意思?
3.有没有办法限制为只能输入字母或数字?
4.好象有时也可以输入#,这个'#'是什么含义?
5.两个分号间的1表示什么?
看了看帮助,没找到解答,所以想请各位大虾给小弟一些指点!:)
...全文
42 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lvjack 2003-08-20
  • 打赏
  • 举报
回复
1、同意yydy(游泳的鱼)
2、!表示用空格补齐时,空格补在开头,反之在结尾
3、可以,但是是定长的很讨厌
4、#该位置可以为数字或 + -,可以留空


Character Meaning in mask
! If the ! character appears in the mask, optional characters are represented in the text as leading blanks. If a ! character is not present, optional characters are represented in the text as trailing blanks.
> If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered.
< 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 encountered.
<> If these two characters appear together in the mask, no case checking is done and the data is formatted with the case the user uses to enter data.
\ 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 the entered data.
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 differs from 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 differs from 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.
delphilove 2003-08-20
  • 打赏
  • 举报
回复
多谢多谢!
windlyzhang 2003-08-20
  • 打赏
  • 举报
回复
1。0表示在该位置必须有一个数字型的字符,9表示可以有数字型的字符也可以空着。
2。假如有!,表示开头的字符可以是任意的,没有的话,结尾的字符可以是任意的
3。数字000000;1;_,字符:LLLLLL;1;_
4.#表示在该位置可以是数字,+(加号) 获-(减号),但也可以空着
5。表示控件的Text中是否应该包括表示格式的字符,0不包括,其他的字符表时包括,例如:
(000)_000-0000;0;* 表示空件的Text的值为:0000000000,而不包括其中的括弧和画线


yydy 2003-08-20
  • 打赏
  • 举报
回复
0:此掩码字符仅允许输入阿拉伯数字,而且一定要输入,即0~9;
9:此掩码字符仅允许输入阿拉伯数字,不一定要输入;

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧