X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..40711af81b4a412892045837997211d597d98ff2:/samples/display/display.cpp diff --git a/samples/display/display.cpp b/samples/display/display.cpp index c497f25a23..2a0b0bc082 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -220,8 +220,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, SetMenuBar(menuBar); #endif // wxUSE_MENUS +#if wxUSE_STATUSBAR // create status bar CreateStatusBar(); +#endif // wxUSE_STATUSBAR // create child controls @@ -293,10 +295,11 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, (unsigned long)nDpy)); } - wxNotebookSizer *notebookSizer = new wxNotebookSizer(m_notebook); - panel->SetSizer(notebookSizer); - notebookSizer->Fit(this); - + wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); + sizer->Add(m_notebook, 1, wxEXPAND); + panel->SetSizer(sizer); + sizer->Fit(this); + sizer->SetSizeHints(this); } wxString MyFrame::VideoModeToText(const wxVideoMode& mode) @@ -335,7 +338,9 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnFromPoint(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_STATUSBAR SetStatusText(_T("Press the mouse anywhere...")); +#endif // wxUSE_STATUSBAR CaptureMouse(); }