X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d553ceb286813319d98ade815c3b17279abb4af5..fe164c3e2ea5453896cd63a5440a26365daec1bc:/samples/checklst/checklst.cpp diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp index 6a16991ec3..41d4f842e9 100644 --- a/samples/checklst/checklst.cpp +++ b/samples/checklst/checklst.cpp @@ -290,7 +290,7 @@ void CheckListBoxFrame::OnToggleSelection(wxCommandEvent& event) { wxSizer *sizer = m_panel->GetSizer(); - sizer->Remove(m_pListBox); + sizer->Detach( m_pListBox ); delete m_pListBox; CreateCheckListbox(event.IsChecked() ? wxLB_EXTENDED : 0); @@ -310,7 +310,7 @@ void CheckListBoxFrame::OnListboxSelect(wxCommandEvent& event) void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& WXUNUSED(event)) { wxString strSelection; - strSelection.sprintf(wxT("Item %d double clicked"), m_pListBox->GetSelection()); + strSelection.Printf(wxT("Item %d double clicked"), m_pListBox->GetSelection()); wxMessageDialog dialog(this, strSelection, wxT("wxCheckListBox message"), wxICON_INFORMATION); dialog.ShowModal(); }