I have a ComboBox that I have modified like this:
The code for that is this (cat_color is an array with strings like "#7FFFD4"):
private void cboCategory_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index != -1)
{
e.DrawBackground();
e.Graphics.FillRectangle(new SolidBrush(ColorTranslator.FromHtml(cat_color1[e.Index])), e.Bounds);
Font f = cboCategory.Font;
e.Graphics.DrawString(cboCategory.Items[e.Index].ToString(), f, new SolidBrush(ColorTranslator.FromHtml(cat_color2[e.Index])), e.Bounds, StringFormat.GenericDefault);
e.DrawFocusRectangle();
}
}
My goal now is to change the item back color when I hover over an item. Is this possible?