fixed bug with showing unneeded scrollbar in the list control (at least under MSW)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-07-02 22:16:12 +00:00
parent adfa6f1a48
commit 7a19fb6e5f

View File

@@ -235,6 +235,12 @@ void wxListbook::OnSize(wxSizeEvent& event)
break;
}
// arrange the icons before calling SetClientSize(), otherwise it wouldn't
// account for the scrollbars the list control might need and, at least
// under MSW, we'd finish with an ugly looking list control with both
// vertical and horizontal scrollbar (with one of them being added because
// the other one is not accounted for in client size computations)
m_list->Arrange();
m_list->Move(posList.x, posList.y);
m_list->SetClientSize(sizeList.x, sizeList.y);
@@ -276,7 +282,7 @@ void wxListbook::OnSize(wxSizeEvent& event)
wxWindow *page = m_pages[m_selection];
wxCHECK_RET( page, _T("NULL page in wxListbook?") );
page->SetSize(GetPageRect());
}
}
}
wxSize wxListbook::CalcSizeFromPage(const wxSize& sizePage) const