* UIDoubleUpDown,UIIntegerDown:修改Enable = false 时显示样式。

This commit is contained in:
Sunny 2021-03-05 17:42:46 +08:00
parent add8a9dfc1
commit dc7d50b983
6 changed files with 31 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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)

View File

@ -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)