ningshuxia
2025-03-27 afbafeecc1325bff849a17fb63b9b2b65b48ddf1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 
    /// </summary>
    public static class TextEditExtensions
    {
        /// <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;
        }
 
 
 
    }
}