]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/listbox.cpp
Further tweaks to accessibility code
[wxWidgets.git] / samples / widgets / listbox.cpp
index dc145a775710b177e14d1c1ed9321b6a6d94ef7d..9b074e4c912ffe2bdbed1d6025af00d6da8c15fc 100644 (file)
@@ -351,7 +351,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 +428,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 +443,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));
     }
@@ -491,20 +491,20 @@ void ListboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
 
 void ListboxWidgetsPage::OnListbox(wxCommandEvent& event)
 {
-    int sel = event.GetInt();
+    long sel = event.GetInt();
     m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
 
-    wxLogMessage(_T("Listbox item %d selected"), sel);
+    wxLogMessage(_T("Listbox item %ld selected"), sel);
 }
 
 void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
 {
-    wxLogMessage(_T("Listbox item %d double clicked"), event.GetInt());
+    wxLogMessage( _T("Listbox item %ld double clicked"), event.GetInt() );
 }
 
 void ListboxWidgetsPage::OnCheckListbox(wxCommandEvent& event)
 {
-    wxLogMessage(_T("Listbox item %d toggled"), event.GetInt());
+    wxLogMessage( _T("Listbox item %ld toggled"), event.GetInt() );
 }
 
 void ListboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event)
@@ -512,4 +512,4 @@ void ListboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event)
     CreateLbox();
 }
 
-#endif
\ No newline at end of file
+#endif