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
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()