* UIDoubleUpDown: 增加禁止输入属性
* UIIntegerUpDown: 增加禁止输入属性
This commit is contained in:
parent
686d5cf828
commit
516e82f287
@ -23,6 +23,7 @@
|
||||
* 2022-01-28: V3.1.0 修正默认值不为0时,编辑值为0的问题
|
||||
* 2022-02-07: V3.1.0 增加圆角控制
|
||||
* 2022-02-24: V3.1.1 可以设置按钮大小和颜色
|
||||
* 2022-05-05: V3.1.8 增加禁止输入属性
|
||||
******************************************************************************/
|
||||
|
||||
using System;
|
||||
@ -54,6 +55,10 @@ namespace Sunny.UI
|
||||
pnlValue.Paint += PnlValue_Paint;
|
||||
}
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Description("禁止输入"), Category("SunnyUI")]
|
||||
public bool ForbidInput { get; set; }
|
||||
|
||||
public Control ExToolTipControl()
|
||||
{
|
||||
return pnlValue;
|
||||
@ -159,6 +164,7 @@ namespace Sunny.UI
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ForbidInput) return;
|
||||
if (ReadOnly) return;
|
||||
|
||||
Value += Step;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* 2020-12-10: V3.0.9 增加Readonly属性
|
||||
* 2022-02-07: V3.1.0 增加圆角控制
|
||||
* 2022-02-24: V3.1.1 可以设置按钮大小和颜色
|
||||
* 2022-05-05: V3.1.8 增加禁止输入属性
|
||||
******************************************************************************/
|
||||
|
||||
using System;
|
||||
@ -51,6 +52,10 @@ namespace Sunny.UI
|
||||
pnlValue.Paint += PnlValue_Paint;
|
||||
}
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Description("禁止输入"), Category("SunnyUI")]
|
||||
public bool ForbidInput { get; set; }
|
||||
|
||||
public Control ExToolTipControl()
|
||||
{
|
||||
return pnlValue;
|
||||
@ -137,6 +142,7 @@ namespace Sunny.UI
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ForbidInput) return;
|
||||
if (ReadOnly) return;
|
||||
|
||||
Value += Step;
|
||||
|
Loading…
x
Reference in New Issue
Block a user