diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 725d3543..14adcc80 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 5affcd13..cb181228 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll index 95dcab67..5b279e4b 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 8dc68af3..698854e0 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI/Controls/UIDoubleUpDown.cs b/SunnyUI/Controls/UIDoubleUpDown.cs index 318d7157..87783f08 100644 --- a/SunnyUI/Controls/UIDoubleUpDown.cs +++ b/SunnyUI/Controls/UIDoubleUpDown.cs @@ -45,6 +45,21 @@ namespace Sunny.UI edit.TextChanged += Edit_TextChanged; edit.Leave += Edit_Leave; //edit.MouseLeave += Edit_Leave; + pnlValue.PaintOther += PnlValue_PaintOther; + } + + private void PnlValue_PaintOther(object sender, PaintEventArgs e) + { + if (Enabled) + { + e.Graphics.DrawLine(RectColor, 0, 0, pnlValue.Width, 0); + e.Graphics.DrawLine(RectColor, 0, Height - 1, pnlValue.Width, Height - 1); + } + else + { + e.Graphics.DrawLine(RectDisableColor, 0, 0, pnlValue.Width, 0); + e.Graphics.DrawLine(RectDisableColor, 0, Height - 1, pnlValue.Width, Height - 1); + } } private void Edit_Leave(object sender, EventArgs e) diff --git a/SunnyUI/Controls/UIIntegerUpDown.cs b/SunnyUI/Controls/UIIntegerUpDown.cs index 1ea422d9..a7e2322a 100644 --- a/SunnyUI/Controls/UIIntegerUpDown.cs +++ b/SunnyUI/Controls/UIIntegerUpDown.cs @@ -45,6 +45,22 @@ namespace Sunny.UI edit.TextChanged += Edit_TextChanged; edit.Leave += Edit_Leave; //edit.MouseLeave += Edit_Leave; + + pnlValue.PaintOther += PnlValue_PaintOther; + } + + private void PnlValue_PaintOther(object sender, PaintEventArgs e) + { + if (Enabled) + { + e.Graphics.DrawLine(RectColor, 0, 0, pnlValue.Width, 0); + e.Graphics.DrawLine(RectColor, 0, Height - 1, pnlValue.Width, Height - 1); + } + else + { + e.Graphics.DrawLine(RectDisableColor, 0, 0, pnlValue.Width, 0); + e.Graphics.DrawLine(RectDisableColor, 0, Height - 1, pnlValue.Width, Height - 1); + } } private void Edit_Leave(object sender, EventArgs e)