public void ColourPicker_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) { ComboBox cbColour = sender as ComboBox; if (e == null || e.Index < 0 || e.Index >= cbColour.Items.Count) { return; } // Get the colour GoogleOgcs.EventColour.Palette colour = (GoogleOgcs.EventColour.Palette)Items[e.Index]; ColourCombobox.DrawComboboxItemColour(cbColour, new SolidBrush(colour.RgbValue), colour.Name, e); }
public void ColourPicker_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) { ComboBox cbColour = sender as ComboBox; if (e == null || e.Index < 0 || e.Index >= cbColour.Items.Count) { return; } // Get the colour OutlookOgcs.Categories.ColourInfo colour = (OutlookOgcs.Categories.ColourInfo)Items[e.Index]; ColourCombobox.DrawComboboxItemColour(cbColour, new SolidBrush(colour.Colour), colour.Text, e); }