Set sizer to the main frame and avoid leaking it
This commit is contained in:
parent
595a9945b5
commit
b91d2a93ee
@ -170,6 +170,7 @@ MyFrame::MyFrame(const wxString& title)
|
|||||||
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
|
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
|
||||||
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
|
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
|
||||||
sizer->Add(aboutBtn, wxSizerFlags().Center());
|
sizer->Add(aboutBtn, wxSizerFlags().Center());
|
||||||
|
SetSizer(sizer);
|
||||||
#endif // wxUSE_MENUS/!wxUSE_MENUS
|
#endif // wxUSE_MENUS/!wxUSE_MENUS
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
|
Loading…
Reference in New Issue
Block a user