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.
I want to set different font for one of toolbutton in wxToolbar.
wxToolbar::SetFont() is not my desire, it will set the same font for all of toolbutton.
Hi,
Even if it is possible on non-MSW platform on Windows it is not possible, since, at least on Windows you are working with the bitmap essentially creating the image list.
So, unless you want to modify every single bitmap, I suggest to use one font.
I thought out a trick way to show different(bold) font on a toolbutton.
That's render icon and bold font label into a bitmap together, then set this rendered bitmap as the bitmap of this toolbutton.
There are two difficult obstacles to me.
1. each of label has different length(but the lenght of string has limit, like 20). That means the width of bitmap from string is not fixed.
2. jiont a icon(width and height is fixed) with the label string bitmap, and If there is a gap between with icon and string bitmap should be great.
You should also ask yourself if this all is worth the effort. It'll be an unusual GUI design element to say the least, i don't think i've ever seen this anywhere.
doublemax wrote:You should also ask yourself if this all is worth the effort. It'll be an unusual GUI design element to say the least, i don't think i've ever seen this anywhere.
Anyway, I still think it is strange there is no member function to set font for label of individual toolbutton.