Add wxCheckListBox::GetCheckedItems() helper.
This method is similar to wxListBox::GetSelections() and allows to retrieve all checked items at once. Closes #14969. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,6 +67,7 @@ void CheckListBoxTestCase::Check()
|
||||
{
|
||||
EventCounter toggled(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED);
|
||||
|
||||
wxArrayInt checkedItems;
|
||||
wxArrayString testitems;
|
||||
testitems.Add("item 0");
|
||||
testitems.Add("item 1");
|
||||
@@ -84,6 +85,9 @@ void CheckListBoxTestCase::Check()
|
||||
CPPUNIT_ASSERT_EQUAL(true, m_check->IsChecked(0));
|
||||
CPPUNIT_ASSERT_EQUAL(false, m_check->IsChecked(1));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1, m_check->GetCheckedItems(checkedItems));
|
||||
CPPUNIT_ASSERT_EQUAL(0, checkedItems[0]);
|
||||
|
||||
//Make sure a double check of an items doesn't deselect it
|
||||
m_check->Check(0);
|
||||
|
||||
|
Reference in New Issue
Block a user