void ComboBox_DrawItem(object sender, DrawItemEventArgs e) { Graphics g = e.Graphics; e.DrawBackground(); FontUIToolkit.DrawFontItem(g, (FontFamilyInfo)ComboBox.Items[e.Index], e.Bounds, (e.State & DrawItemState.Selected) == DrawItemState.Selected); }
void ComboBox_DrawItem(object sender, DrawItemEventArgs e) { Graphics g = e.Graphics; e.DrawBackground(); if (e.Index >= 0 && e.Index < base.Items.Count) { FontUIToolkit.DrawFontItem(g, (FontFamily)base.Items[e.Index], e.Bounds, (e.State & DrawItemState.Selected) == DrawItemState.Selected); } }