Ticket URL: <
http://trac.wxwidgets.org/ticket/10566#comment:9>
#10566: wxGTK-2.8.9 wxComboBox::SetFont() does not work
--------------------------------+-------------------------------------------
Reporter: ettl.martin | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGTK | Version: 2.8.x
Keywords: wxComboBox SetFont | Blockedby:
Patch: 0 | Blocking: 10680
--------------------------------+-------------------------------------------
Changes (by rveerd):
* version: => 2.8.x
Comment:
This still does not work in wxWidgets 2.8.12 with GTK+ 2.24.10 on Ubuntu.
It appears this widget consists of multiple GTK widgets. Maybe the font is
not propagated to these widgets?
{{{
Frame::Frame(wxWindow* parent, wxWindowID id, const wxString& title)
: wxFrame(parent, id, title)
{
wxPanel* panel = new wxPanel(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL,
_T("Panel"));
const wxChar* choices[] = {
"Apples",
"Bananas",
"Cherries"};
size_t count = sizeof(choices) / sizeof(choices[0]);
wxFont font(wxFont(8, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL, false, _T("monospace")));
wxComboBox* combo = new wxComboBox(panel, wxID_ANY, choices[0],
wxPoint(10, 10), wxSize(200, 25), wxArrayString(count,
choices));
combo->SetFont(font); // Does not work; combo box uses the default
font.
wxChoice* choice = new wxChoice(panel, wxID_ANY,
wxPoint(10, 40), wxSize(200, 25), wxArrayString(count,
choices));
choice->SetFont(font); // Does work; choice uses the supplied
font.
}
}}}
--
Ticket URL: <
http://trac.wxwidgets.org/ticket/10566#comment:9>