using DevExpress.XtraEditors;
|
|
namespace IStation.WinTest
|
{
|
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;
|
}
|
|
|
|
}
|
}
|