Shuxia Ning
2024-08-28 1a8a81785470302fc7fbd6914a9df5d1094dac2a
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;
        }
 
 
 
    }
}