wxBitmapCombobox cuts text

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
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Jun 11, 2008 7:46 am

wxBitmapCombobox cuts text

Post by KaiHin » Thu Feb 22, 2018 3:23 pm

Hi all,

with wxWidgets 3.0.3 the expanded combox has the same size and does not take care about the length of the entries.
wxBmpCbo_3.0.png (1.74 KiB) Viewed 576 times
With 2.8.12 it works fine:
wxBmpCbo_2.8.png (3.93 KiB) Viewed 576 times
To reproduce it change samples/widgets/bmpcombobox.cpp[line 388-40]:
m_combobox->Create(this, BitmapComboBoxPage_Combo, wxEmptyString,
// wxDefaultPosition, wxDefaultSize,
wxDefaultPosition, wxSize(44,-1),
0, NULL,

// This will sure make the list look nicer when larger images are used.

sizerRight->Add(m_combobox, 0, wxGROW | wxALL, 5);
// sizerRight->SetMinSize(150, 0);
m_sizerCombo = sizerRight; // save it to modify it later

// the 3 panes panes compose the window
sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
sizerTop->Add(sizerMiddle, 5, wxGROW | wxALL, 10);
// sizerTop->Add(sizerRight, 4, wxGROW | (wxALL & ~wxRIGHT), 10);
sizerTop->Add(sizerRight, 0, 0, 10);

Then start widgets-BitmapCombobox demo and 'Insert image from file'.

Problem occurs only on Windows. Any suggestions?

Thank you

Post Reply