diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 609b5a6f..a45f2a31 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index dfa54de1..551187c1 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe index 075a9fab..4b3669a9 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe and b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 609b5a6f..a45f2a31 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Controls/FButton.Designer.cs b/SunnyUI.Demo/Controls/FButton.Designer.cs index deef2b09..0b3533a3 100644 --- a/SunnyUI.Demo/Controls/FButton.Designer.cs +++ b/SunnyUI.Demo/Controls/FButton.Designer.cs @@ -168,7 +168,7 @@ this.uiButton1.StyleCustomMode = true; this.uiButton1.TabIndex = 0; this.uiButton1.Text = "White"; - this.uiButton1.TipsText = "White"; + this.uiToolTip1.SetToolTip(this.uiButton1, "White"); // // uiButton2 // @@ -181,7 +181,7 @@ this.uiButton2.StyleCustomMode = true; this.uiButton2.TabIndex = 1; this.uiButton2.Text = "Blue"; - this.uiButton2.TipsText = "Blue"; + this.uiToolTip1.SetToolTip(this.uiButton2, "Blue"); // // uiButton3 // @@ -989,6 +989,7 @@ // uiToolTip1 // this.uiToolTip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(54)))), ((int)(((byte)(54))))); + this.uiToolTip1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiToolTip1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(239))))); this.uiToolTip1.OwnerDraw = true; this.uiToolTip1.ToolTipTitle = "ToolTip title"; diff --git a/SunnyUI/Controls/UIToolTip.cs b/SunnyUI/Controls/UIToolTip.cs index 54353f49..4c78250d 100644 --- a/SunnyUI/Controls/UIToolTip.cs +++ b/SunnyUI/Controls/UIToolTip.cs @@ -6,6 +6,9 @@ using System.Windows.Forms; namespace Sunny.UI { + [ProvideProperty("ToolTip", typeof(Control))] + [DefaultEvent("Popup")] + [ToolboxItemFilter("System.Windows.Forms")] public class UIToolTip : ToolTip { private readonly ConcurrentDictionary ToolTipControls = @@ -121,9 +124,9 @@ namespace Sunny.UI ToolTipControls.TryRemove(control, out _); } - public new ToolTipControl GetToolTip(Control control) + public new string GetToolTip(Control control) { - return ToolTipControls.ContainsKey(control) ? ToolTipControls[control] : new ToolTipControl(); + return ToolTipControls.ContainsKey(control) ? ToolTipControls[control].Description : ""; } private void InitOwnerDraw()