]>
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 wxCheckListBox is like a wxListBox, but allows items to be checked or
16 When using this class under Windows wxWidgets must be compiled with
17 wxUSE_OWNER_DRAWN set to 1.
19 Only the new functions for this class are documented; see also wxListBox.
21 Please note that wxCheckListBox uses client data in its implementation,
22 and therefore this is not available to the application.
24 @beginEventTable{wxCommandEvent}
25 @event{EVT_CHECKLISTBOX(id, func)}
26 Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
27 the check list box is checked or unchecked.
32 <!-- @appearance{checklistbox.png} -->
34 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
36 class wxCheckListBox
: public wxListBox
46 Constructor, creating and showing a list box.
49 Parent window. Must not be @NULL.
51 Window identifier. The value wxID_ANY indicates a default value.
55 Window size. If wxDefaultSize is specified then the window is sized
58 Number of strings with which to initialise the control.
60 An array of strings with which to initialise the control.
62 Window style. See wxCheckListBox.
68 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
69 const wxPoint
& pos
= wxDefaultPosition
,
70 const wxSize
& size
= wxDefaultSize
,
72 const wxString choices
[] = NULL
,
74 const wxValidator
& validator
= wxDefaultValidator
,
75 const wxString
& name
= "listBox");
76 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
79 const wxArrayString
& choices
,
81 const wxValidator
& validator
= wxDefaultValidator
,
82 const wxString
& name
= "listBox");
86 Destructor, destroying the list box.
91 Checks the given item. Note that calling this method does not result in
92 a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.
95 Index of item to check.
97 @true if the item is to be checked, @false otherwise.
99 void Check(int item
, bool check
= true);
102 Returns @true if the given item is checked, @false otherwise.
105 Index of item whose check status is to be returned.
107 bool IsChecked(unsigned int item
) const;