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:
@@ -402,10 +402,11 @@ MyFrame::MyFrame()
|
|||||||
RecreateBook();
|
RecreateBook();
|
||||||
|
|
||||||
m_panel->SetSizer(m_sizerFrame);
|
m_panel->SetSizer(m_sizerFrame);
|
||||||
|
m_panel->Layout();
|
||||||
|
|
||||||
m_sizerFrame->SetSizeHints(this);
|
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
sizer->Add(m_panel, wxSizerFlags(1).Expand());
|
||||||
Centre(wxBOTH);
|
SetSizerAndFit(sizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
MyFrame::~MyFrame()
|
MyFrame::~MyFrame()
|
||||||
|
Reference in New Issue
Block a user