WxCheckListBox

From WxWiki

Jump to: navigation, search

A checklistbox is like a wxListBox, but allows items to be checked or unchecked.


On msw the list items have an ugly grey background. To change it to white you can do the following:

 wxString choices[] = {"item1", "item2", "item3"};
 wxCheckListBox* checklist = new wxCheckListBox(this, -1,wxDefaultPosition, wxDefaultSize, 3, choices);
 for (int i = 0; i < checklist->GetCount(); ++i) checklist->GetItem(i)->SetBackgroundColour(*wxWHITE);
Personal tools