From a9afb0576c1b6c1d426688597891d34dd94a9418 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 3 Oct 2010 10:51:50 +0000 Subject: [PATCH] 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 --- src/msw/bmpcbox.cpp | 3 +++ 1 file changed, 3 insertions(+) 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() -- 2.45.2