Separated out book control sizing code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -207,6 +207,9 @@ protected:
|
|||||||
// Always rely on GetBestSize, which will look at all the pages
|
// Always rely on GetBestSize, which will look at all the pages
|
||||||
virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
|
virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { }
|
||||||
|
|
||||||
|
// Lay out controls
|
||||||
|
void DoSize();
|
||||||
|
|
||||||
// the array of all pages of this control
|
// the array of all pages of this control
|
||||||
wxArrayPages m_pages;
|
wxArrayPages m_pages;
|
||||||
|
|
||||||
|
@@ -252,10 +252,9 @@ wxRect wxBookCtrlBase::GetPageRect() const
|
|||||||
return rectPage;
|
return rectPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBookCtrlBase::OnSize(wxSizeEvent& event)
|
// Lay out controls
|
||||||
|
void wxBookCtrlBase::DoSize()
|
||||||
{
|
{
|
||||||
event.Skip();
|
|
||||||
|
|
||||||
if ( !m_bookctrl )
|
if ( !m_bookctrl )
|
||||||
{
|
{
|
||||||
// we're not fully created yet or OnSize() should be hidden by derived class
|
// we're not fully created yet or OnSize() should be hidden by derived class
|
||||||
@@ -303,6 +302,13 @@ void wxBookCtrlBase::OnSize(wxSizeEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxBookCtrlBase::OnSize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
|
|
||||||
|
DoSize();
|
||||||
|
}
|
||||||
|
|
||||||
wxSize wxBookCtrlBase::GetControllerSize() const
|
wxSize wxBookCtrlBase::GetControllerSize() const
|
||||||
{
|
{
|
||||||
if(!m_bookctrl)
|
if(!m_bookctrl)
|
||||||
|
Reference in New Issue
Block a user