ComboBox item text colors

  • Thread starter Thread starter jesuran
  • Start date Start date
J

jesuran

Hi,
I have got a combobox which retrieves its data from a dataset:
Code:

Private dvsItem As DataView dvsItem = New
DataView(MainForm.TempPrice.TempPriceBook.Copy) dvsItem.Sort =
"ItemCode" cbItem.DataSource = dvsItem cbItem.DisplayMember =
"ItemCode" cbItem.ValueMember = "ItemCode"

I would like to have it so that, within the ComboBox itself, different
items are colored differently. Is this possible? I tried making a
little project just to test this, and looks to me like that I can only
set the font color of all items and not apply colors selectivley.
Thanks
 
I have found my solution by setting the DrawMode to OwnerDrawFixed,
and making my own ComboBox1_DrawItem which handles ComboBox1.DrawItem.
 
Back
Top