X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/453535a739f649ce43a65fd7e6b9730363bb1b7c..084ad0c2424aa998a640c151f8fa762435364449:/samples/widgets/notebook.cpp diff --git a/samples/widgets/notebook.cpp b/samples/widgets/notebook.cpp index 4d6902cb3e..74ef9c3e69 100644 --- a/samples/widgets/notebook.cpp +++ b/samples/widgets/notebook.cpp @@ -286,6 +286,8 @@ void BookWidgetsPage::CreateContent() sizerTop->Add(sizerMiddle, 0, wxGROW | wxALL, 10); sizerTop->Add(m_sizerBook, 1, wxGROW | (wxALL & ~wxRIGHT), 10); + RecreateBook(); + // final initializations Reset(); #if USE_ICONS_IN_BOOK @@ -525,7 +527,7 @@ void BookWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event) void BookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event) { if(m_book) - event.SetText( wxString::Format(_T("%d"), m_book->GetPageCount()) ); + event.SetText( wxString::Format(_T("%u"), unsigned(m_book->GetPageCount())) ); } void BookWidgetsPage::OnUpdateUICurSelectText(wxUpdateUIEvent& event) @@ -570,7 +572,6 @@ protected: return new wxNotebook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: @@ -652,7 +653,6 @@ protected: return new wxListbook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: @@ -726,7 +726,6 @@ protected: return new wxChoicebook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: