public override void PaintValue(PaintValueEventArgs e)
{
var ts = (TextStyle) e.Value;
using (var b = new SolidBrush(ts.BackColor))
{
e.Graphics.FillRectangle(b, e.Bounds);
}
FontStyle fs = FontStyle.Regular;
if (ts.Bold)
fs |= FontStyle.Bold;
if (ts.Italic)
fs |= FontStyle.Italic;
if (ts.Underline)
fs |= FontStyle.Underline;
var f = new Font("arial", 8f, fs);
using (var b = new SolidBrush(ts.ForeColor))
{
e.Graphics.DrawString("abc", f, b, e.Bounds);
}
f.Dispose();
}