wxComboBox with different font in each line Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Elmi
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Thu Mar 12, 2009 3:23 pm
Location: Germany
Contact:

wxComboBox with different font in each line

Post by Elmi »

Hi,

I have a wxComboBox which works as font selector list. Means every entry in this combo box is the name of a font.

Now I want to make this more user-friendly and not only show the name of the font but also how it looks like. So I want to set the font itself for each entry which would end up with a wxComboBox where every entry makes use of an own, different font.

My question: how can I do that? Is there a way to set a different font for each wxComboBox entry? As far as I know I can set only one font per wxComboBox but not per entry...

Thanks!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxComboBox with different font in each line

Post by PB »

I think you would need to use ownder drawn wxComboBox, see the combo sample for inspiration. It should not be difficult. Just don't forget that you cannot draw names of all fonts in their font only, e.g., it would make the list somewhat useless for symbol fonts or fonts using alphabet unfamiliar to the user...
Post Reply