Ticket #14969 (closed enhancement: fixed)

Opened 4 months ago

Last modified 4 months ago

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: Patch: yes
Blocking:

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

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

Change History

Changed 4 months ago by hartwigw

Changed 4 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!

Changed 4 months ago by hartwigw

Modified

Changed 4 months ago by hartwigw

Changed 4 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.

Changed 4 months ago by VZ

  • status changed from confirmed to closed
  • resolution set to fixed

(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.