]>
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 @beginEventEmissionTable{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. wxCommandEvent::GetInt()
22 will contain the index of the item that was checked or unchecked.
23 wxCommandEvent::IsChecked() is not valid! Use wxCheckListBox::IsChecked()
29 @appearance{checklistbox.png}
31 @see wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
33 class wxCheckListBox
: public wxListBox
43 Constructor, creating and showing a list box.
46 Parent window. Must not be @NULL.
48 Window identifier. The value wxID_ANY indicates a default value.
52 Window size. If wxDefaultSize is specified then the window is sized
55 Number of strings with which to initialise the control.
57 An array of strings with which to initialise the control.
59 Window style. See wxCheckListBox.
65 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
66 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
,
69 const wxString choices
[] = NULL
,
71 const wxValidator
& validator
= wxDefaultValidator
,
72 const wxString
& name
= "listBox");
74 Constructor, creating and showing a list box.
77 Parent window. Must not be @NULL.
79 Window identifier. The value wxID_ANY indicates a default value.
83 Window size. If wxDefaultSize is specified then the window is sized
86 An array of strings with which to initialise the control.
88 Window style. See wxCheckListBox.
94 wxCheckListBox(wxWindow
* parent
, wxWindowID id
,
97 const wxArrayString
& choices
,
99 const wxValidator
& validator
= wxDefaultValidator
,
100 const wxString
& name
= "listBox");
104 Destructor, destroying the list box.
106 virtual ~wxCheckListBox();
109 Checks the given item. Note that calling this method does not result in
110 a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.
113 Index of item to check.
115 @true if the item is to be checked, @false otherwise.
117 void Check(unsigned int item
, bool check
= true);
120 Returns @true if the given item is checked, @false otherwise.
123 Index of item whose check status is to be returned.
125 bool IsChecked(unsigned int item
) const;