* UINumPadTextBox: 增加了最大值、最小值等属性

This commit is contained in:
Sunny 2023-03-26 22:57:35 +08:00
parent fdebecf3a9
commit b5b1e8b5a4
2 changed files with 39 additions and 0 deletions

View File

@ -74,6 +74,14 @@ namespace Sunny.UI
ControlBoxRect = new Rectangle(Width - 24, 0, 24, Height);
}
[Description("开启后可响应某些触屏的点击事件"), Category("SunnyUI")]
[DefaultValue(false)]
public bool TouchPressClick
{
get => edit.TouchPressClick;
set => edit.TouchPressClick = value;
}
private UIButton tipsBtn;
public void SetTipsText(ToolTip toolTip, string text)
{

View File

@ -18,6 +18,7 @@
*
* 2023-03-18: V3.3.3
* 2023-03-26: V3.3.3 ValueChangedEnter事件相应此事件
* 2023-03-26: V3.3.4
******************************************************************************/
using System;
@ -268,5 +269,35 @@ namespace Sunny.UI
if (NumPadForm != null && NumPadForm.Visible)
NumPadForm.Close();
}
/// <summary>
/// 当InputType为数字类型时能输入的最大值
/// </summary>
[Description("当InputType为数字类型时能输入的最大值。"), Category("SunnyUI")]
[DefaultValue(2147483647D)]
public double Maximum
{
get => edit.MaxValue;
set => edit.MaxValue = value;
}
/// <summary>
/// 当InputType为数字类型时能输入的最小值
/// </summary>
[Description("当InputType为数字类型时能输入的最小值。"), Category("SunnyUI")]
[DefaultValue(-2147483648D)]
public double Minimum
{
get => edit.MinValue;
set => edit.MinValue = value;
}
[Description("浮点数,显示文字小数位数"), Category("SunnyUI")]
[DefaultValue(2)]
public int DecimalPlaces
{
get => edit.DecLength;
set => edit.DecLength = Math.Max(value, 0);
}
}
}