]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/layout/layout.cpp
wx needs imported for the error code
[wxWidgets.git] / samples / layout / layout.cpp
index ce576a3c1d3b7ac74697c5b22d13be2007f1d743..58ce14a866782dfcbbf1767e7b812dfe1e4b067a 100644 (file)
@@ -66,7 +66,7 @@ END_EVENT_TABLE()
 
 // Define my frame constructor
 MyFrame::MyFrame()
-       : wxFrame(NULL, wxID_ANY, _T("wxWindows Layout Demo"),
+       : wxFrame(NULL, wxID_ANY, _T("wxWidgets Layout Demo"),
                  wxDefaultPosition, wxDefaultSize,
                  wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE)
 {
@@ -91,9 +91,10 @@ MyFrame::MyFrame()
   // Associate the menu bar with the frame
   SetMenuBar(menu_bar);
 
+#if wxUSE_STATUSBAR
   CreateStatusBar(2);
-  SetStatusText(_T("wxWindows layout demo"));
-
+  SetStatusText(_T("wxWidgets layout demo"));
+#endif // wxUSE_STATUSBAR
 
   // we want to get a dialog that is stretchable because it
   // has a text ctrl in the middle. at the bottom, we have
@@ -146,6 +147,7 @@ MyFrame::MyFrame()
     topsizer->Add(gridsizer, 1, wxGROW | wxALL, 10);
 
 
+#if wxUSE_STATLINE
   // 3) middle: create wxStaticLine with minimum size (3x3)
   topsizer->Add(
      new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL),
@@ -153,6 +155,7 @@ MyFrame::MyFrame()
      wxEXPAND |   // make horizontally stretchable
      wxALL,       //   and make border all around
      5 );         // set border width to 5
+#endif // wxUSE_STATLINE
 
 
   // 4) bottom: create two centred wxButtons
@@ -201,7 +204,7 @@ void MyFrame::TestNotebookSizers(wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
 {
-    (void)wxMessageBox(_T("wxWindows GUI library layout demo\n"),
+    (void)wxMessageBox(_T("wxWidgets GUI library layout demo\n"),
             _T("About Layout Demo"), wxOK|wxICON_INFORMATION);
 }
 
@@ -326,8 +329,7 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxChar *title)
     wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
 
     wxNotebook *notebook = new wxNotebook( this, wxID_ANY );
-    wxNotebookSizer *nbs = new wxNotebookSizer( notebook );
-    topsizer->Add( nbs, 1, wxGROW );
+    topsizer->Add( notebook, 1, wxGROW );
 
     wxButton *button = new wxButton( this, wxID_OK, _T("OK") );
     topsizer->Add( button, 0, wxALIGN_RIGHT | wxALL, 10 );