fixed bug in determining the best listbox size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b5ff2fbd94
commit
5b6d6b7008
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user