Shuxia Ning
2024-08-07 554694000f4d7ffc231a23e7ff429595c254ceaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using DevExpress.XtraEditors;
 
namespace IStation.Win
{
    public static class TextEditExtend
    {
        /// <summary>
        /// 只能输入数字
        /// </summary> 
        public static void SetNumeric(this TextEdit txt)
        {
            txt.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            // txt.Properties.Mask.UseMaskAsDisplayFormat = true;
            txt.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
            txt.Text = string.Empty;
        }
 
 
 
    }
}