X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d553ceb286813319d98ade815c3b17279abb4af5..2d75caaa6d36bd82abf1d7130551635d711fe586:/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);