]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/notebook/test.cpp
Motif corrections in
[wxWidgets.git] / samples / notebook / test.cpp
index e9867c144cc8ae407563592c1344cb476b650814..7ee1dfb3e86db99c27bb2d3cddd76c4916534462 100644 (file)
@@ -20,7 +20,6 @@
 #include "wx/wx.h"
 #endif
 
-#include "wx/tab.h"
 #include "test.h"
 
 // If 1, use a dialog. Otherwise use a frame.
@@ -44,6 +43,12 @@ bool MyApp::OnInit(void)
 #else
   frame = new MyFrame((wxFrame*) NULL, -1, (char *) "Notebook", wxPoint(-1, -1), wxSize(365, 390), wxDEFAULT_FRAME_STYLE);
 
+  // Problem with generic wxNotebook implementation whereby it doesn't size properly unless
+  // you set the size again (to a different size than before, since SetSize is optimized)
+#if defined(__WXMOTIF__) || defined(__WIN16__)
+  frame->SetSize(-1, -1, 370, 390);
+#endif
+
   return TRUE;
 #endif
 }
@@ -82,7 +87,7 @@ void MyApp::InitTabView(wxNotebook* notebook, wxWindow* window)
   (void)new wxButton(panel1, -1, "Press me", wxPoint(10, 10));
   (void)new wxTextCtrl(panel1, -1, "1234", wxPoint(10, 40), wxSize(120, 150));
   
-  notebook->AddPage(panel1, "Cat");
+  notebook->AddPage(panel1, "Cat", TRUE);
 
   wxPanel *panel2 = new wxPanel(notebook, -1);
   panel2->SetBackgroundColour(wxColour("BLUE"));