X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/453535a739f649ce43a65fd7e6b9730363bb1b7c..6bddfdbf19f0d77034872367a7d66a8581c2f119:/samples/widgets/notebook.cpp diff --git a/samples/widgets/notebook.cpp b/samples/widgets/notebook.cpp index 4d6902cb3e..116ee5d91b 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 @@ -293,8 +295,6 @@ void BookWidgetsPage::CreateContent() #endif // USE_ICONS_IN_BOOK SetSizer(sizerTop); - - sizerTop->Fit(this); } BookWidgetsPage::~BookWidgetsPage() @@ -525,7 +525,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 +570,6 @@ protected: return new wxNotebook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: @@ -652,7 +651,6 @@ protected: return new wxListbook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: @@ -726,7 +724,6 @@ protected: return new wxChoicebook(this, BookPage_Book, wxDefaultPosition, wxDefaultSize, flags); - } private: