* UITextBox: 增加对按钮设置ToolTip
This commit is contained in:
parent
57c83b2b1b
commit
f3058c2d5d
@ -32,6 +32,7 @@
|
|||||||
* 2022-01-07: V3.1.0 按钮支持自定义颜色
|
* 2022-01-07: V3.1.0 按钮支持自定义颜色
|
||||||
* 2022-02-16: V3.1.1 增加了只读的颜色设置
|
* 2022-02-16: V3.1.1 增加了只读的颜色设置
|
||||||
* 2022-03-14: V3.1.1 增加滚动条的颜色设置
|
* 2022-03-14: V3.1.1 增加滚动条的颜色设置
|
||||||
|
* 2022-04-11: V3.1.3 增加对按钮设置ToolTip
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -119,6 +120,11 @@ namespace Sunny.UI
|
|||||||
TextAlignmentChange += UITextBox_TextAlignmentChange;
|
TextAlignmentChange += UITextBox_TextAlignmentChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetButtonToolTip(ToolTip toolTip, string tipText)
|
||||||
|
{
|
||||||
|
toolTip.SetToolTip(btn, tipText);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -71,6 +71,15 @@ namespace Sunny.UI
|
|||||||
[DefaultValue(typeof(Size), "100, 70"), Description("不自动缩放时大小"), Category("SunnyUI")]
|
[DefaultValue(typeof(Size), "100, 70"), Description("不自动缩放时大小"), Category("SunnyUI")]
|
||||||
public Size Size { get; set; } = new Size(100, 70);
|
public Size Size { get; set; } = new Size(100, 70);
|
||||||
|
|
||||||
|
public new void SetToolTip(Control control, string caption)
|
||||||
|
{
|
||||||
|
base.SetToolTip(control, caption);
|
||||||
|
if (control is IToolTip toolTip)
|
||||||
|
{
|
||||||
|
base.SetToolTip(toolTip.ExToolTipControl(), caption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetToolTip(Control control, string caption, string title, int symbol, int symbolSize,
|
public void SetToolTip(Control control, string caption, string title, int symbol, int symbolSize,
|
||||||
Color symbolColor)
|
Color symbolColor)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user