How to show Combo Box items in a different color or bold?

How to show Combo Box items in a different color or bold?

Post by JB » Wed, 23 Apr 2008 07:52:37


Hi All,

I have a DataGridView in which some columns are combo boxes (i.e.
DataGridViewComboBoxColumn). I populate these Combo Boxes directly by
using code like this:

Dim NewCol As New System.Windows.Forms.DataGridViewComboBoxColumn
NewCol.Items.Add("Item 1")
NewCol.Items.Add("Item 2")
NewCol.Items.Add("Item 3")

I'd like to know if there's a way to show some items in a different
color or bold font.

Thanks
JB
 
 
 

How to show Combo Box items in a different color or bold?

Post by JB » Wed, 23 Apr 2008 08:26:56

PS: I'm using VB.NET 2005 with framework 2.0

 
 
 

How to show Combo Box items in a different color or bold?

Post by Cor Ligthe » Wed, 23 Apr 2008 12:10:25

JB,

With drawing you can do almost everything, be however aware that there are
specialist who do this kind of things.

I don't know your expirience but be aware that this needs often more lines
of code than a complete solution.

Cor

"JB" < XXXX@XXXXX.COM > schreef in bericht
 
 
 

How to show Combo Box items in a different color or bold?

Post by JB » Fri, 25 Apr 2008 03:21:14

On 22 Apr, 04:10, "Cor Ligthert[MVP]" < XXXX@XXXXX.COM >



Hi Cor,

Do you mean that the way to do this is to use owner drawn control or
at least overriding the drawing method(s) on my conbo box control?

Thanks
JB
 
 
 

How to show Combo Box items in a different color or bold?

Post by Martin » Fri, 20 Jun 2008 05:27:26

DaisyCombo has very strong styling ability to the dropdown list.

Could find it at www.springsys.com