Eidt Value setting

原创 2016年08月29日 09:45:56
        /// <summary>
        /// Set SpinEdit integer format.
        /// </summary>
        /// <param name="editControl">SpinEdit Control</param>
        /// <param name="minValue">Min Value</param>
        /// <param name="maxValue">Max Value</param>
        public static void SetIntegerFormat(this SpinEdit editControl, int minValue, int maxValue) {
            if (editControl == null)
                throw new ArgumentNullException("editControl");

            SetIntegerFormat(editControl, minValue, maxValue, minValue);
        }

        /// <summary>
        /// Set SpinEdit integer format.
        /// </summary>
        /// <param name="editControl">SpinEdit Control</param>
        /// <param name="minValue">Min Value</param>
        /// <param name="maxValue">Max Value</param>
        public static void SetIntegerFormat(this SpinEdit editControl, int minValue, int maxValue, int defaultValue) {
            if (editControl == null)
                throw new ArgumentNullException("editControl");

            editControl.Properties.IsFloatValue = false;
            editControl.Properties.Mask.EditMask = "N0";
            editControl.Properties.DisplayFormat.FormatType = FormatType.Numeric;
            editControl.Properties.DisplayFormat.FormatString = "N0";
            editControl.Properties.EditFormat.FormatType = FormatType.Numeric;
            editControl.Properties.EditFormat.FormatString = "N0";
            editControl.Properties.MinValue = minValue;
            editControl.Properties.MaxValue = maxValue;
            editControl.Value = defaultValue;
        }


 LotQtySpinEdit.SetIntegerFormat(1, 999999, 1);

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cg

org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cg...

exception setting property value with CGLIB 错误解决

1javax.servlet.ServletException: Error creating bean with name 'userServiceProxy' defined in class...

警告: Error setting expression 'user.phone' with value '[Ljava.lang.String;@1c0b8a0'

警告: Error setting expression 'user.phone' with value '[Ljava.lang.String;@1c0b8a0' ognl.OgnlExcepti...

Error setting value Method "setAge" failed for object ..Ljava.lang.String 错误总结

Error setting value Method "setAge" failed for object ..Ljava.lang.String 错误总结 (2012-02-01 11:01:46...

exception setting property value with CGLIB 问题

exception setting property value with CGLIB 问题

关于报错WARN OgnlValueStack:49Error setting expression 'pass.x' with value '[Ljava.lang.String;@218c2661

关于以下报错的解决方案: 将提交按钮由图片形式  改为  或者 images/login1_02_07.gif"  onclick="javascript:document.form.subm...

com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression 'ext-comp-1020' with value '[

[ WARN]http-8080-2 -com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression 'ext-comp...
  • le5yo
  • le5yo
  • 2011年08月27日 11:20
  • 2575

Error setting expression 'tel' with value '[Ljava.lang.String;@38ec843'和'user.tel' with value

Error setting expression 'tel' with value '[Ljava.lang.String;@101fe4ec' ognl.MethodFailedException:...

Unexpected Exception caught setting 'x' on class xx:Error setting expression 'xx' with value ['x',]

废话不多说,直接进入正题:在用SSH框架敲代码时,遇到这样的一个问题: Unexpected Exception caught setting 'act' on 'classcn.itcas...

两字符串的编辑距离 (Eidt Distance)

题目描述: 要求两字符串有差异的字符个数。例如:  aaaaabaaaaa  aaaaacaabaa  这两个字符串,最大公共字串长度是5,但它们只有两个字符不同,函数输出值应为2。  ...
  • lhwww
  • lhwww
  • 2014年12月13日 23:35
  • 485
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Eidt Value setting
举报原因:
原因补充:

(最多只允许输入30个字)