From: Jaakko Salli Date: Sun, 3 Oct 2010 10:51:50 +0000 (+0000) Subject: In wxBitmapComboBox::RecreateControl(), always get recreated control's height from... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a9afb0576c1b6c1d426688597891d34dd94a9418 In wxBitmapComboBox::RecreateControl(), always get recreated control's height from the best size, and also set the ComboBox item height with CB_SETITEMHEIGHT message (fixes #12515). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp index 8e6496094a..19a5d3a050 100644 --- a/src/msw/bmpcbox.cpp +++ b/src/msw/bmpcbox.cpp @@ -131,6 +131,7 @@ void wxBitmapComboBox::RecreateControl() wxString value = GetValue(); wxPoint pos = GetPosition(); wxSize size = GetSize(); + size.y = GetBestSize().y; wxArrayString strings = GetStrings(); wxComboBox::DoClear(); @@ -176,6 +177,8 @@ void wxBitmapComboBox::RecreateControl() { SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); } + + ::SendMessage(GetHwnd(), CB_SETITEMHEIGHT, 0, MeasureItem(0)); } wxBitmapComboBox::~wxBitmapComboBox()