【问题标题】:Limit the input length of a DevExpress TextEdit and MemoEdit controls限制 DevExpress TextEdit 和 MemoEdit 控件的输入长度
【发布时间】:2012-09-17 21:57:23
【问题描述】:

我有一个项目,其中包含一些 3rd-party 控件。我的表单中有一个 TextEdit 和一个 MemoEdit,我想限制用户可以输入的字符数。

【问题讨论】:

    标签: c# winforms devexpress


    【解决方案1】:

    您可以等待最新版本,但有一些解决方法,例如屏蔽、辅助属性和/或文本更改事件的字符计数。以下是一些解决方法的链接:

    掩码解决方法:http://www.devexpress.com/Support/Center/p/Q250641.aspx

    Helper 属性解决方法:http://www.devexpress.com/Support/Center/p/S131769.aspx

    文本更改/字符数:http://www.qtcentre.org/threads/6776-Text-edit-and-maxLength

    【讨论】:

    • 我认为这是针对 WPF 表单的
    • 从其中一篇帖子中查看此注释:Even though it is devoted to WPF editors, this functionality will also be included in AgEditors, because they share the same sources. WinForms 控件也支持屏蔽。
    • 好的,谢谢...在最新版本的 Devexpress 中有一个功能可以限制 maxLenght (textEdit.properties.MaxLenght),我只需要升级我的版本 ;)
    猜你喜欢
    • 2014-04-07
    • 1970-01-01
    • 2015-10-30
    • 2012-02-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多