A checklistbox is like a listbox, but allows items to be checked or unchecked.
This class is currently implemented under Windows and GTK. When using this class under Windows wxWindows must be compiled with USE_OWNER_DRAWN set to 1.
Only the new functions for this class are documented; see also wxListBox.
Derived from
wxListBox
wxControl
wxWindow
wxEvtHandler
wxObject
Include files
<wx/checklst.h>
Window styles
See wxListBox.
Event handling
EVT_CHECKLISTBOX(id, func) | Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event, when an item in the check list box is checked or unchecked. |
See also
wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
Members
wxCheckListBox::wxCheckListBox
wxCheckListBox::~wxCheckListBox
wxCheckListBox::Check
wxCheckListBox::IsChecked
wxCheckListBox()
Default constructor.
wxCheckListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listBox")
Constructor, creating and showing a list box.
Parameters
parent
id
pos
size
n
choices
style
validator
name
wxPython note: The wxCheckListBox constructor in wxPython reduces the n and choices arguments are to a single argument, which is a list of strings.
wxPerl note: In wxPerl there is just an array reference in place of n and choices.
void ~wxCheckListBox()
Destructor, destroying the list box.
void Check(int item, bool check = TRUE)
Checks the given item. Note that calling this method doesn't result in wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
Parameters
item
check
bool IsChecked(int item) const
Returns TRUE if the given item is checked, FALSE otherwise.
Parameters
item