如何自定义设置MaskEdit中的EditMask属性

swgdd 2004-11-09 09:38:00
我想在MskEdit中自定设置EditMask属性,如何在Input Mask Editor中设置Input Mask值,在线等待,不胜感激!
...全文
265 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
swgdd 2004-11-14
  • 打赏
  • 举报
回复
非常感激,谢谢
lamshy 2004-11-10
  • 打赏
  • 举报
回复
这是我在Delphi的帮助抄来的,希望能帮上忙。
lamshy 2004-11-10
  • 打赏
  • 举报
回复
Character Meaning in mask

! If a ! 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 a mask, no case checking is done and the data is formatted with the case the user uses to enter the 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 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 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.
lamshy 2004-11-10
  • 打赏
  • 举报
回复
你是想要这些吗?
MaskEdit1.EditMask := '!\(999\)000-0000;1';
MaskEdit1.Text = '';
fayeflash 2004-11-10
  • 打赏
  • 举报
回复
lamshy(风中男仔)真是个热心人。挺好的。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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