ComboBox change font on specific item..
-
Hello. I have a combobox with a couple of items in it. Instead of having a label on the form that describes the content of the combobox id like to use the textproperty for this purpose. So far so fine. But now I want to change the textproperty of the combobox to italic but leave the rest of the items in the combobox as regular text. Anyone knows how I can do this. As it is now when i change the combobox.Font.Italic prop all the items in the collection is set to italic. //Thx
-
Hello. I have a combobox with a couple of items in it. Instead of having a label on the form that describes the content of the combobox id like to use the textproperty for this purpose. So far so fine. But now I want to change the textproperty of the combobox to italic but leave the rest of the items in the combobox as regular text. Anyone knows how I can do this. As it is now when i change the combobox.Font.Italic prop all the items in the collection is set to italic. //Thx
It's all or nothing using the standard control. If you wanted more control over the textbox and the list fonts, you'd have to create your own version that supports this, supplying the properties to be set for each side of the control and supplying all the rendering code to draw the textbox and the drop down list.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007