X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/687706f5e722ac8a39172024f794ae0ffbd190e2..99d800190a04a2deaf769017a5fae04a4ae50378:/src/msw/listbox.cpp diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 6e50fde3e0..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 ) @@ -390,7 +386,7 @@ void wxListBox::Free() } } -void wxListBox::SetSelection(int N, bool select) +void wxListBox::DoSetSelection(int N, bool select) { wxCHECK_RET( N == wxNOT_FOUND || (N >= 0 && N < m_noItems), @@ -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)*