X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aec18ff785687e1d0830da8cd287903128a994c6..335991afa513fee73e1def9824fa2d547686f659:/samples/widgets/listbox.cpp?ds=sidebyside diff --git a/samples/widgets/listbox.cpp b/samples/widgets/listbox.cpp index ca2773d805..33d578c86c 100644 --- a/samples/widgets/listbox.cpp +++ b/samples/widgets/listbox.cpp @@ -28,6 +28,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/bitmap.h" #include "wx/button.h" #include "wx/checkbox.h" #include "wx/combobox.h" @@ -351,7 +352,7 @@ void ListboxWidgetsPage::CreateLbox() items.Add(m_lbox->GetString(n)); } - m_sizerLbox->Remove(m_lbox); + m_sizerLbox->Detach( m_lbox ); delete m_lbox; } @@ -428,7 +429,7 @@ void ListboxWidgetsPage::OnButtonClear(wxCommandEvent& event) void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& event) { - static size_t s_item = 0; + static unsigned int s_item = 0; wxString s = m_textAdd->GetValue(); if ( !m_textAdd->IsModified() ) @@ -443,7 +444,7 @@ void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& event) void ListboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event)) { // "many" means 1000 here - for ( size_t n = 0; n < 1000; n++ ) + for ( unsigned int n = 0; n < 1000; n++ ) { m_lbox->Append(wxString::Format(_T("item #%u"), n)); }