]>
git.saurik.com Git - wxWidgets.git/blob - interface/checklst.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxCheckListBox
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 A checklistbox is like a listbox, but allows items to be checked or unchecked.
15 When using this class under Windows wxWidgets must be compiled with
16 USE_OWNER_DRAWN set to 1.
18 Only the new functions for this class are documented; see also wxListBox.
20 Please note that wxCheckListBox uses client data in its implementation,
21 and therefore this is not available to the application.
24 @event{EVT_CHECKLISTBOX(id, func)}:
25 Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
26 the check list box is checked or unchecked.
31 @appearance{checklistbox.png}
33 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
35 class wxCheckListBox
: public wxListBox
40 Constructor, creating and showing a list box.
43 Parent window. Must not be @NULL.
45 Window identifier. The value wxID_ANY indicates a default value.
49 Window size. If wxDefaultSize is specified then the window is
53 Number of strings with which to initialise the control.
55 An array of strings with which to initialise the control.
57 Window style. See wxCheckListBox.
64 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
65 const wxPoint
& pos
= wxDefaultPosition
,
66 const wxSize
& size
= wxDefaultSize
,
68 const wxString choices
[] = NULL
,
70 const wxValidator
& validator
= wxDefaultValidator
,
71 const wxString
& name
= "listBox");
72 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
75 const wxArrayString
& choices
,
77 const wxValidator
& validator
= wxDefaultValidator
,
78 const wxString
& name
= "listBox");
82 Destructor, destroying the list box.
87 Checks the given item. Note that calling this method doesn't result in
88 wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
91 Index of item to check.
93 @true if the item is to be checked, @false otherwise.
95 void Check(int item
, bool check
= true);