]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/notebook/notebook.cpp
wxTinderbox build fix.
[wxWidgets.git] / samples / notebook / notebook.cpp
index 066fe3b2e7a5f880c27cf10fb38046238cd646cc..b0eb08c72fba382ec1f7514fb1a4a1fe02158b37 100644 (file)
@@ -436,7 +436,7 @@ void MyFrame::RecreateBook()
                 if ( parent != wxNOT_FOUND )
                 {
                     wxStaticCast(m_bookCtrl, wxTreebook)->
-                        AddSubPage(parent, page, str, false, image);
+                        InsertSubPage(parent, page, str, false, image);
 
                     // skip adding it again below
                     continue;
@@ -600,15 +600,18 @@ void MyFrame::OnAddSubPage(wxCommandEvent& WXUNUSED(event))
         }
 
         static unsigned s_subPageAdded = 0;
-        currBook->AddSubPage(selPos,
-                             CreateNewPage(),
-                             wxString::Format
-                             (
-                                ADDED_SUB_PAGE_NAME wxT("%u"),
-                                ++s_subPageAdded
-                             ),
-                             true,
-                             GetIconIndex(currBook));
+        currBook->InsertSubPage
+                  (
+                    selPos,
+                    CreateNewPage(),
+                    wxString::Format
+                    (
+                     ADDED_SUB_PAGE_NAME wxT("%u"),
+                     ++s_subPageAdded
+                    ),
+                    true,
+                    GetIconIndex(currBook)
+                  );
     }
 }