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

wxBitmapCombobox cuts text

Postby 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
wxBmpCbo_3.0.png (1.74 KiB) Viewed 277 times

With 2.8.12 it works fine:
wxBmpCbo_2.8.png
wxBmpCbo_2.8.png (3.93 KiB) Viewed 277 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,
wxCB_READONLY);

#if defined(wxGENERIC_BITMAPCOMBOBOX)
// This will sure make the list look nicer when larger images are used.
m_combobox->SetPopupMaxHeight(600);
#endif

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

Return to “C++ Development”

Who is online

Users browsing this forum: DavidHart and 24 guests