#14969 closed enhancement (fixed)

wxCheckListBox is missing a method to obtain the checked items

Reported by: hartwigw Owned by:
Priority: low Milestone:
Component: GUI-all Version:
Keywords: wxCheckListBox checked items Cc:
Blocked By: Blocking:
Patch: yes

Description

wxCheckListBox is missing a method to obtain easily the checked items. Attached is a patch that implements this functionality. The implementation is similar to GetSelections(wxArrayInt&).

Attachments (2)

checklistbox.patch download (1.0 KB) - added by hartwigw 16 months ago.
checklistbox_2.patch download (2.3 KB) - added by hartwigw 15 months ago.

Download all attachments as: .zip

Change History (6)

Changed 16 months ago by hartwigw

comment:1 Changed 15 months ago by vadz

  • Priority changed from normal to low
  • Status changed from new to confirmed

I agree that such method could be useful but could you please:

  1. Add documentation for it to interface/wx/checklst.h.
  2. Add at least a simple unit test to tests/controls/checklistboxtest.cpp.
  3. Reformat the code to look a bit more like the rest of wxWidgets, notably add braces around the loop body longer than one line.

TIA!

comment:2 Changed 15 months ago by hartwigw

Modified

Changed 15 months ago by hartwigw

comment:3 Changed 15 months ago by VZ

(In [73421]) Derive wxCheckListBox from wxCheckListBoxBase in wxGTK.

This ensures that any methods defined in wxCheckListBoxBase will be available
in wxGTK wxCheckListBox too.

See #14969.

comment:4 Changed 15 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [73422]) Add wxCheckListBox::GetCheckedItems() helper.

This method is similar to wxListBox::GetSelections() and allows to retrieve
all checked items at once.

Closes #14969.

Note: See TracTickets for help on using tickets.