Added BorderColor

This commit is contained in:
Jaex 2022-09-30 03:59:40 +03:00
parent fa2633ef05
commit 3ad81d6d6c

View file

@ -112,6 +112,23 @@ public bool DrawBorder
}
}
private Color borderColor;
[DefaultValue(typeof(Color), "Black")]
public Color BorderColor
{
get
{
return borderColor;
}
set
{
borderColor = value;
Invalidate();
}
}
private bool autoEllipsis;
[DefaultValue(false)]
@ -150,7 +167,10 @@ protected override void OnPaint(PaintEventArgs pe)
if (drawBorder)
{
g.DrawRectangleProper(Pens.Black, ClientRectangle);
using (Pen pen = new Pen(BorderColor, 1))
{
g.DrawRectangleProper(pen, ClientRectangle);
}
}
}
}