X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d709457c8dbbb814299ec5c41862bd479d2d8adc..959b1a338e3b7c0e237b53ef3d7c9b51f4063eb6:/samples/notebook/notebook.cpp diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 066fe3b2e7..b0eb08c72f 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -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) + ); } }