1 \section{\class{wxCheckListBox
}}\label{wxchecklistbox
}
3 A checklistbox is like a listbox, but allows items to be checked or unchecked.
5 When using this class under Windows wxWidgets must be compiled with USE
\_OWNER\_DRAWN set to
1.
7 Only the new functions for this class are documented; see also
\helpref{wxListBox
}{wxlistbox
}.
9 Please note that wxCheckListBox uses client data in its implementation,
10 and therefore this is not available to the application.
12 \wxheading{Derived from
}
14 \helpref{wxListBox
}{wxlistbox
}\\
15 \helpref{wxControl
}{wxcontrol
}\\
16 \helpref{wxWindow
}{wxwindow
}\\
17 \helpref{wxEvtHandler
}{wxevthandler
}\\
18 \helpref{wxObject
}{wxobject
}
20 \wxheading{Include files
}
24 \wxheading{Window styles
}
26 See
\helpref{wxListBox
}{wxlistbox
}.
28 \wxheading{Event handling
}
31 \begin{twocollist
}\itemsep=
0pt
32 \twocolitem{{\bf EVT
\_CHECKLISTBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
33 when an item in the check list box is checked or unchecked.
}
38 \helpref{wxListBox
}{wxlistbox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxComboBox
}{wxcombobox
},
\helpref{wxListCtrl
}{wxlistctrl
},
39 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
41 \latexignore{\rtfignore{\wxheading{Members
}}}
43 \membersection{wxCheckListBox::wxCheckListBox
}\label{wxchecklistboxctor
}
45 \func{}{wxCheckListBox
}{\void}
49 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
50 \param{const wxPoint\&
}{ pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
\rtfsp
51 \param{int
}{ n
},
\param{const wxString
}{choices
[] = NULL
},
\rtfsp
52 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
54 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
55 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
\rtfsp
56 \param{const wxArrayString\&
}{choices
},
\rtfsp
57 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
59 Constructor, creating and showing a list box.
61 \wxheading{Parameters
}
63 \docparam{parent
}{Parent window. Must not be NULL.
}
65 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
67 \docparam{pos
}{Window position.
}
69 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
72 \docparam{n
}{Number of strings with which to initialise the control.
}
74 \docparam{choices
}{An array of strings with which to initialise the control.
}
76 \docparam{style
}{Window style. See
\helpref{wxCheckListBox
}{wxchecklistbox
}.
}
78 \docparam{validator
}{Window validator.
}
80 \docparam{name
}{Window name.
}
82 \pythonnote{The wxCheckListBox constructor in wxPython reduces the
{\tt n
}
83 and
{\tt choices
} arguments are to a single argument, which is
86 \perlnote{In wxPerl there is just an array reference in place of
{\tt n
}
89 \membersection{wxCheckListBox::
\destruct{wxCheckListBox
}}\label{wxchecklistboxdtor
}
91 \func{void
}{\destruct{wxCheckListBox
}}{\void}
93 Destructor, destroying the list box.
95 \membersection{wxCheckListBox::Check
}\label{wxchecklistboxcheck
}
97 \func{void
}{Check
}{\param{int
}{item
},
\param{bool
}{ check = true
}}
99 Checks the given item. Note that calling this method doesn't result in
100 wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
102 \wxheading{Parameters
}
104 \docparam{item
}{Index of item to check.
}
106 \docparam{check
}{true if the item is to be checked, false otherwise.
}
108 \membersection{wxCheckListBox::IsChecked
}\label{wxchecklistboxischecked
}
110 \constfunc{bool
}{IsChecked
}{\param{int
}{ item
}}
112 Returns true if the given item is checked, false otherwise.
114 \wxheading{Parameters
}
116 \docparam{item
}{Index of item whose check status is to be returned.
}