]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/notebook/notebook.cpp
trying to support non-wx controls on a window
[wxWidgets.git] / samples / notebook / notebook.cpp
index 8e196ba498f4a27f7a5a99bd49b1e2aa56eabfe0..d10150e17c492f85032c674b0b23473565100757 100644 (file)
@@ -36,7 +36,7 @@ bool MyApp::OnInit()
 #if defined(__WXMOTIF__)
     int width, height;
     frame->GetSize(& width, & height);
 #if defined(__WXMOTIF__)
     int width, height;
     frame->GetSize(& width, & height);
-    frame->SetSize(wxDefaultPosition.x, wxDefaultPosition.y, width, height);
+    frame->SetSize(wxDefaultCoord, wxDefaultCoord, width, height);
 #endif
 
     frame->Show();
 #endif
 
     frame->Show();
@@ -390,11 +390,8 @@ void MyFrame::ReInitNotebook()
             m_notebook->AddPage(page, str, false, m_notebook->GetIconIndex() );
         }
 
             m_notebook->AddPage(page, str, false, m_notebook->GetIconIndex() );
         }
 
-        if (m_sizerNotebook)
-        {
-            m_sizerTop->Remove(m_sizerNotebook);
-        }
-
+        m_sizerTop->Detach(notebook);
+        
         delete notebook;
 
         // restore selection
         delete notebook;
 
         // restore selection
@@ -406,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();
 }
 
     m_sizerTop->Layout();
 }