Allow small widths when setting initial strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-08-04 15:33:13 +00:00
parent 62e1396736
commit c91aeed0a8
2 changed files with 2 additions and 2 deletions

View File

@@ -588,7 +588,7 @@ wxSize wxChoice::DoGetBestSize() const
}
// but not less than the minimal width
if ( ret.x < 80 )
if ( GetCount() == 0 && ret.x < 80 )
ret.x = 80;
// If this request_size is called with no entries then

View File

@@ -1365,7 +1365,7 @@ wxSize wxComboBox::DoGetBestSize() const
}
// empty combobox should have some reasonable default size too
if ( ret.x < 100 )
if ( GetCount() == 0 && ret.x < 100 )
ret.x = 100;
CacheBestSize(ret);