]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/notebook/notebook.cpp
made --cppflags return -DwxUSE_GUI=0 when used with --libs=base
[wxWidgets.git] / samples / notebook / notebook.cpp
index 71caa697f22351aad714a2b05eeb070893349ddd..5e0d05be50a008448f98f213712704386554376a 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by: Dimitri Schoolwerth
 // Created:     26/10/98
 // RCS-ID:      $Id$
-// Copyright:   (c) 1998-2002 wxWindows team
+// Copyright:   (c) 1998-2002 wxWidgets team
 // License:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
@@ -137,8 +137,7 @@ wxPanel *MyNotebook::CreateBigButtonPage()
 {
     wxPanel *panel = new wxPanel(this);
 
-    wxButton *buttonBig = new wxButton( panel, wxID_ANY, wxT("Maximized button"),
-        wxPoint(0, 0), wxSize(480, 360) );
+    wxButton *buttonBig = new wxButton(panel, wxID_ANY, wxT("Maximized button"));
 
     wxBoxSizer *sizerPanel = new wxBoxSizer(wxVERTICAL);
     sizerPanel->Add(buttonBig, 1, wxEXPAND);
@@ -316,9 +315,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
 
     m_panel->SetSizer(m_sizerFrame);
 
-    m_panel->SetAutoLayout(true);
-
     m_sizerFrame->Fit(this);
+    m_sizerFrame->SetSizeHints(this);
 
     Centre(wxBOTH);
 
@@ -392,11 +390,8 @@ void MyFrame::ReInitNotebook()
             m_notebook->AddPage(page, str, false, m_notebook->GetIconIndex() );
         }
 
-        if (m_sizerNotebook)
-        {
-            m_sizerTop->Remove(m_sizerNotebook);
-        }
-
+        m_sizerTop->Remove(notebook);
+        
         delete notebook;
 
         // restore selection
@@ -408,8 +403,7 @@ void MyFrame::ReInitNotebook()
     }
 
 
-    m_sizerNotebook = new wxBookCtrlSizer(m_notebook);
-    m_sizerTop->Add(m_sizerNotebook, 1, wxEXPAND | wxALL, 4);
+    m_sizerTop->Add(m_notebook, 1, wxEXPAND | wxALL, 4);
     m_sizerTop->Layout();
 }