X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/004f4002877acc09d8bc213602f55b22bdbae345..96360917d3c000e479ec64806b96188342eea260:/samples/checklst/checklst.cpp?ds=sidebyside diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp index df48055236..97ae0b0120 100644 --- a/samples/checklst/checklst.cpp +++ b/samples/checklst/checklst.cpp @@ -127,7 +127,7 @@ BEGIN_EVENT_TABLE(CheckListBoxFrame, wxFrame) EVT_MENU(Menu_Selection, CheckListBoxFrame::OnToggleSelection) EVT_MENU(Menu_Extended, CheckListBoxFrame::OnToggleExtended) EVT_MENU(Menu_Sorting, CheckListBoxFrame::OnToggleSorting) - + EVT_MENU(Menu_InsertItemsStart, CheckListBoxFrame::OnInsertItemsStart) EVT_MENU(Menu_InsertItemsMiddle, CheckListBoxFrame::OnInsertItemsMiddle) EVT_MENU(Menu_InsertItemsEnd, CheckListBoxFrame::OnInsertItemsEnd) @@ -151,6 +151,9 @@ IMPLEMENT_APP(CheckListBoxApp) // init our app: create windows bool CheckListBoxApp::OnInit(void) { + if ( !wxApp::OnInit() ) + return false; + CheckListBoxFrame *pFrame = new CheckListBoxFrame ( NULL, @@ -269,8 +272,6 @@ void CheckListBoxFrame::CreateCheckListbox(long flags) flags ); - //m_pListBox->SetBackgroundColour(*wxGREEN); - delete [] astrChoices; // set grey background for every second entry @@ -406,7 +407,7 @@ void CheckListBoxFrame::OnToggleExtended(wxCommandEvent& event) sizer->Insert(0, m_pListBox, 1, wxGROW | wxALL, 10); - m_panel->Layout(); + m_panel->Layout(); } void CheckListBoxFrame::OnToggleSorting(wxCommandEvent& event) @@ -420,7 +421,7 @@ void CheckListBoxFrame::OnToggleSorting(wxCommandEvent& event) sizer->Insert(0, m_pListBox, 1, wxGROW | wxALL, 10); - m_panel->Layout(); + m_panel->Layout(); } void CheckListBoxFrame::OnListboxSelect(wxCommandEvent& event)