X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d553ceb286813319d98ade815c3b17279abb4af5..1da7f7a5bebc9a8640a1f171afb0ab7d62926fdb:/samples/checklst/checklst.cpp diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp index 6a16991ec3..41c135cc71 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);