]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/checklst.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxCheckListBox
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 A wxCheckListBox is like a wxListBox, but allows items to be checked or
15 When using this class under Windows wxWidgets must be compiled with
16 wxUSE_OWNER_DRAWN set to 1.
18 @beginEventTable{wxCommandEvent}
19 @event{EVT_CHECKLISTBOX(id, func)}
20 Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
21 the check list box is checked or unchecked.
26 @appearance{checklistbox.png}
28 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
30 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 sized
52 Number of strings with which to initialise the control.
54 An array of strings with which to initialise the control.
56 Window style. See wxCheckListBox.
62 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
63 const wxPoint
& pos
= wxDefaultPosition
,
64 const wxSize
& size
= wxDefaultSize
,
66 const wxString choices
[] = NULL
,
68 const wxValidator
& validator
= wxDefaultValidator
,
69 const wxString
& name
= "listBox");
71 Constructor, creating and showing a list box.
74 Parent window. Must not be @NULL.
76 Window identifier. The value wxID_ANY indicates a default value.
80 Window size. If wxDefaultSize is specified then the window is sized
83 An array of strings with which to initialise the control.
85 Window style. See wxCheckListBox.
91 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
94 const wxArrayString
& choices
,
96 const wxValidator
& validator
= wxDefaultValidator
,
97 const wxString
& name
= "listBox");
101 Destructor, destroying the list box.
103 virtual ~wxCheckListBox();
106 Checks the given item. Note that calling this method does not result in
107 a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.
110 Index of item to check.
112 @true if the item is to be checked, @false otherwise.
114 void Check(unsigned int item
, bool check
= true);
117 Returns @true if the given item is checked, @false otherwise.
120 Index of item whose check status is to be returned.
122 bool IsChecked(unsigned int item
) const;