Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用蒙面文本框时遇到了一些麻烦。
如何隐藏默认显示在文本框中的那些下划线?!
此外,我希望用户最多可以输入 3 位数字(他/她可以输入至少 1 位和最多 3 位数字)。如何设置?
在掩码文本框的Promptchar 属性中设置空格(留一个空格) 。 和你已经得到的第二个答案。或者您可以为此对 Leave 事件进行验证。
我认为您最好为此使用常规的 TextBox 。将其设置为仅允许数字和最多 3 位数字是通过属性完成的。然后您只需手动检查是否存在至少一位数字。