projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5ff2fb
)
fixed bug in determining the best listbox size
author
Vadim Zeitlin
<vadim@wxwidgets.org>
Wed, 6 Jun 2001 00:05:42 +0000
(
00:05
+0000)
committer
Vadim Zeitlin
<vadim@wxwidgets.org>
Wed, 6 Jun 2001 00:05:42 +0000
(
00:05
+0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10436
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/msw/listbox.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/msw/listbox.cpp
b/src/msw/listbox.cpp
index 147e73c917c49c68fff0260baa60ca31ef0cc24b..e466ae97eed8e4c10f2194a932eecdce66c1b5d1 100644
(file)
--- a/
src/msw/listbox.cpp
+++ b/
src/msw/listbox.cpp
@@
-663,7
+663,10
@@
wxSize wxListBox::DoGetBestSize() const
wListbox += 3*cx;
- int hListbox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*(wxMax(m_noItems, 7));
+ // don't make the listbox too tall (limit height to 10 items) but don't
+ // make it too small neither
+ int hListbox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*
+ wxMin(wxMax(m_noItems, 3), 10);
return wxSize(wListbox, hListbox);
}