C#C
C#3y ago
23 replies
PotatOBiTz

✅ Changing the individual font of items in a Combo Box - C# Windows Forms

Hello! I'm making a font changer windows forms program as a practice program and I want to change the font of the items listed in a combo box, and make it display the selected item as it is. I've been trying for a while, but I don't know what to do exactly. I've been seeing answers of using the DrawItem event, and I've tried something I've seen in a Stack Overflow post, but I don't really understand what's going on in that code and the combo box displays [Font Family: Name = <Font Name>] instead of "<Font Name with its respective font style>" when I select an item. I've been trying to modify it for a while, trying to declare variables to make it only show its face name with .Name, but I get errors. What should I do? Thanks in advance
Screenshot_88.png
Was this page helpful?