Correct notebook sample layout.

Use a sizer for the frame to make sure its initial and minimal size correspond
to the best size of the panel inside it. Also add a Layout() call on the panel
which was somehow not done initially. And finally don't centre the frame, this
is unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-22 11:58:50 +00:00
parent ade4ae2c51
commit 119629aa5d

View File

@@ -402,10 +402,11 @@ MyFrame::MyFrame()
RecreateBook();
m_panel->SetSizer(m_sizerFrame);
m_panel->Layout();
m_sizerFrame->SetSizeHints(this);
Centre(wxBOTH);
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add(m_panel, wxSizerFlags(1).Expand());
SetSizerAndFit(sizer);
}
MyFrame::~MyFrame()