diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe
index 5315c3cb..d9a6a15c 100644
Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ
diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll
index 322fb5b5..47668c0a 100644
Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ
diff --git a/Bin/net45/SunnyUI.dll b/Bin/net45/SunnyUI.dll
index 0e95eb56..0973afcc 100644
Binary files a/Bin/net45/SunnyUI.dll and b/Bin/net45/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll
index 52b85e54..cb0870ab 100644
Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll
index 43d3b22e..32fd82d6 100644
Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ
diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll
index 511ca791..c0068d47 100644
Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ
diff --git a/SunnyUI.Demo/Controls/FCombobox.cs b/SunnyUI.Demo/Controls/FCombobox.cs
index 638cec07..5dc3f2bf 100644
--- a/SunnyUI.Demo/Controls/FCombobox.cs
+++ b/SunnyUI.Demo/Controls/FCombobox.cs
@@ -52,12 +52,12 @@ namespace Sunny.UI.Demo
private void uiComboTreeView1_NodeSelected(object sender, System.Windows.Forms.TreeNode node)
{
- ShowInfoTip(node.Text);
+ //ShowInfoTip(node.Text);
}
private void uiComboTreeView2_NodesSelected(object sender, System.Windows.Forms.TreeNodeCollection node)
{
- ShowInfoTip(uiComboTreeView2.Text);
+ //ShowInfoTip(uiComboTreeView2.Text);
}
public class Info
@@ -68,7 +68,7 @@ namespace Sunny.UI.Demo
private void uiComboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
- ShowInfoTip(uiComboBox2.SelectedValue.ToString());
+ //ShowInfoTip(uiComboBox2.SelectedValue.ToString());
}
private void uiColorPicker1_Click(object sender, EventArgs e)
diff --git a/SunnyUI.Demo/Controls/FTabControl.Designer.cs b/SunnyUI.Demo/Controls/FTabControl.Designer.cs
index ec8e18f3..da60b1d8 100644
--- a/SunnyUI.Demo/Controls/FTabControl.Designer.cs
+++ b/SunnyUI.Demo/Controls/FTabControl.Designer.cs
@@ -96,7 +96,7 @@
this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.tabPage2.Location = new System.Drawing.Point(0, 40);
this.tabPage2.Name = "tabPage2";
- this.tabPage2.Size = new System.Drawing.Size(670, 143);
+ this.tabPage2.Size = new System.Drawing.Size(450, 230);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2";
//
@@ -105,7 +105,7 @@
this.tabPage3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tabPage3.Location = new System.Drawing.Point(0, 40);
this.tabPage3.Name = "tabPage3";
- this.tabPage3.Size = new System.Drawing.Size(670, 143);
+ this.tabPage3.Size = new System.Drawing.Size(450, 230);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "tabPage3";
//
@@ -113,7 +113,7 @@
//
this.tabPage9.Location = new System.Drawing.Point(0, 40);
this.tabPage9.Name = "tabPage9";
- this.tabPage9.Size = new System.Drawing.Size(670, 143);
+ this.tabPage9.Size = new System.Drawing.Size(450, 230);
this.tabPage9.TabIndex = 4;
this.tabPage9.Text = "tabPage9";
this.tabPage9.UseVisualStyleBackColor = true;
@@ -122,7 +122,7 @@
//
this.tabPage10.Location = new System.Drawing.Point(0, 40);
this.tabPage10.Name = "tabPage10";
- this.tabPage10.Size = new System.Drawing.Size(670, 143);
+ this.tabPage10.Size = new System.Drawing.Size(450, 230);
this.tabPage10.TabIndex = 5;
this.tabPage10.Text = "tabPage10";
this.tabPage10.UseVisualStyleBackColor = true;
@@ -131,7 +131,7 @@
//
this.tabPage11.Location = new System.Drawing.Point(0, 40);
this.tabPage11.Name = "tabPage11";
- this.tabPage11.Size = new System.Drawing.Size(670, 143);
+ this.tabPage11.Size = new System.Drawing.Size(450, 230);
this.tabPage11.TabIndex = 6;
this.tabPage11.Text = "tabPage11";
this.tabPage11.UseVisualStyleBackColor = true;
@@ -140,7 +140,7 @@
//
this.tabPage12.Location = new System.Drawing.Point(0, 40);
this.tabPage12.Name = "tabPage12";
- this.tabPage12.Size = new System.Drawing.Size(670, 143);
+ this.tabPage12.Size = new System.Drawing.Size(450, 230);
this.tabPage12.TabIndex = 7;
this.tabPage12.Text = "tabPage12";
this.tabPage12.UseVisualStyleBackColor = true;
@@ -149,7 +149,7 @@
//
this.tabPage13.Location = new System.Drawing.Point(0, 40);
this.tabPage13.Name = "tabPage13";
- this.tabPage13.Size = new System.Drawing.Size(670, 143);
+ this.tabPage13.Size = new System.Drawing.Size(450, 230);
this.tabPage13.TabIndex = 8;
this.tabPage13.Text = "tabPage13";
this.tabPage13.UseVisualStyleBackColor = true;
@@ -241,7 +241,6 @@
//
// FTabControl
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 654);
this.Name = "FTabControl";
diff --git a/SunnyUI/Controls/UITabControl.cs b/SunnyUI/Controls/UITabControl.cs
index 4552d3b4..5f96c129 100644
--- a/SunnyUI/Controls/UITabControl.cs
+++ b/SunnyUI/Controls/UITabControl.cs
@@ -292,6 +292,24 @@ namespace Sunny.UI
}
}
+ private int tabSelectedHighColorSize = 4;
+
+ ///
+ /// 边框颜色
+ ///
+ [Description("选中Tab页高亮高度"), Category("SunnyUI")]
+ [DefaultValue(4)]
+ public int TabSelectedHighColorSize
+
+ {
+ get => tabSelectedHighColorSize;
+ set
+ {
+ tabSelectedHighColorSize = Math.Max(value, 0);
+ Invalidate();
+ }
+ }
+
private UIStyle _style = UIStyle.Blue;
///
@@ -439,7 +457,9 @@ namespace Sunny.UI
if (index == SelectedIndex)
{
g.Clear(TabSelectedColor);
- g.FillRectangle(TabSelectedHighColor, 0, bmp.Height - 4, bmp.Width, 4);
+
+ if (TabSelectedHighColorSize > 0)
+ g.FillRectangle(TabSelectedHighColor, 0, bmp.Height - TabSelectedHighColorSize, bmp.Width, TabSelectedHighColorSize);
}
g.DrawString(TabPages[index].Text, Font, index == SelectedIndex ? tabSelectedForeColor : TabUnSelectedForeColor, textLeft, TabRect.Top + 2 + (TabRect.Height - sf.Height - 4) / 2.0f);