]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/checklst/checklst.cpp
corrected drawing of the bitmaps for the disabled menu items (replaces patch 1632891...
[wxWidgets.git] / samples / checklst / checklst.cpp
index 9ae58191f42671ac7807eb608c4dadb9573f50f4..a6e13a446725a5d0df3a942141f29e9cf42ccce6 100644 (file)
@@ -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)
@@ -146,7 +146,7 @@ BEGIN_EVENT_TABLE(CheckListBoxFrame, wxFrame)
     EVT_BUTTON(Btn_Down, CheckListBoxFrame::OnButtonDown)
 END_EVENT_TABLE()
 
-IMPLEMENT_APP(CheckListBoxApp);
+IMPLEMENT_APP(CheckListBoxApp)
 
 // init our app: create windows
 bool CheckListBoxApp::OnInit(void)
@@ -269,8 +269,6 @@ void CheckListBoxFrame::CreateCheckListbox(long flags)
          flags
         );
 
-    //m_pListBox->SetBackgroundColour(*wxGREEN);
-
     delete [] astrChoices;
 
     // set grey background for every second entry
@@ -406,7 +404,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 +418,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)
@@ -499,7 +497,7 @@ void CheckListBoxFrame::OnButtonMove(bool up)
         wxString label = m_pListBox->GetString(selection);
 
         int positionNew = up ? selection - 1 : selection + 2;
-        if ( positionNew < 0 || positionNew > m_pListBox->GetCount() )
+        if ( positionNew < 0 || positionNew > (int)m_pListBox->GetCount() )
         {
             wxLogStatus(this, wxT("Can't move this item %s"), up ? wxT("up") : wxT("down"));
         }