private void DrawItem(System.Windows.Forms.DrawItemEventArgs e, InterlinLineSpec spec)
{
bool selected = ((e.State & DrawItemState.Selected) != 0);
Brush textBrush = GetBrush(spec, selected);
try
{
Font drawFont = e.Font;
e.DrawBackground();
e.Graphics.DrawString(optionsList.Items[e.Index].ToString(), drawFont, textBrush, e.Bounds);
}
finally
{
if (!selected)
textBrush.Dispose();
}
}