简体   繁体   English

如何设置特定格式的editEdit输入格式

[英]How to set editEdit input format in specific format

How to set editEdit input format in specific format, I want set it to XXXX-XXX-XXX-XXXX(X) in the character format. 如何以特定格式设置editEdit输入格式,我想将其设置为字符格式为XXXX-XXX-XXX-XXXX(X)。

I try many way at the textEdit.properties still unable to set it. 我尝试在textEdit.properties上仍然无法设置的许多方法。

Best regards, Thank you. 最好的问候,谢谢。

I believe that you can use the simple mask : 我相信您可以使用简单的遮罩

textEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple;
textEdit1.Properties.Mask.EditMask = "AAAA-AAA-AAA-AAAA(a)";

Mask's etacharacters are: Mask的字符为:
A any alphanumeric character(required) A任何字母数字字符(必需)
a any alphanumeric character(optional) a任何字母数字字符(可选)

Related help article: Mask Editors Overview 相关帮助文章: 蒙版编辑器概述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM