From 8def743e8fcd51ba3e68cb6b59154d3557e18f79 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 Feb 2000 15:45:36 +0000 Subject: [PATCH] fix for (too big) combobox height git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/combobox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 903b6b5e7c..f00c1297c9 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -332,9 +332,14 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) int cx, cy; wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + // what should the height of the drop down list be? we choose 10 items by + // default and also 10 items max (if we always use n, the list will never + // have vertical scrollbar) int n = GetCount(); if ( !n ) n = 10; + else if ( n > 10 ) + n = 10; height = n * EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); -- 2.45.2