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
This commit is contained in:
Jaakko Salli
2010-10-03 10:51:50 +00:00
parent 864186dd39
commit a9afb0576c

View File

@@ -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()