X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6179a847d8899cceb8880abc2ab2fe9d0244c90..99d800190a04a2deaf769017a5fae04a4ae50378:/src/msw/listbox.cpp diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 360767c00f..5f27c25a6e 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -43,10 +43,6 @@ #include "wx/ownerdrw.h" #endif -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - #if wxUSE_EXTENDED_RTTI WX_DEFINE_FLAGS( wxListBoxStyle ) @@ -507,7 +503,7 @@ int wxListBox::GetSelection() const wxString wxListBox::GetString(int N) const { wxCHECK_MSG( N >= 0 && N < m_noItems, wxEmptyString, - wxT("invalid index in wxListBox::GetClientData") ); + wxT("invalid index in wxListBox::GetString") ); int len = ListBox_GetTextLen(GetHwnd(), N); @@ -687,6 +683,9 @@ wxSize wxListBox::DoGetBestSize() const wListbox += 3*cx; + // Add room for the scrollbar + wListbox += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + // 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)*