]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/checklst.tex
implemented nested index entries and index entries pointing to multiple documents...
[wxWidgets.git] / docs / latex / wx / checklst.tex
CommitLineData
3972fb49
JS
1\section{\class{wxCheckListBox}}\label{wxchecklistbox}
2
3A checklistbox is like a listbox, but allows items to be checked or unchecked.
4
12a44087 5This class is currently implemented under Windows and GTK. When using this
fc2171bd 6class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
3972fb49
JS
7
8Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
9
03ca23b6
JS
10Please note that wxCheckListBox uses client data in its implementation,
11and therefore this is not available to the application.
12
3972fb49
JS
13\wxheading{Derived from}
14
15\helpref{wxListBox}{wxlistbox}\\
16\helpref{wxControl}{wxcontrol}\\
17\helpref{wxWindow}{wxwindow}\\
18\helpref{wxEvtHandler}{wxevthandler}\\
19\helpref{wxObject}{wxobject}
20
954b8ae6
JS
21\wxheading{Include files}
22
23<wx/checklst.h>
24
3972fb49
JS
25\wxheading{Window styles}
26
27See \helpref{wxListBox}{wxlistbox}.
28
29\wxheading{Event handling}
30
dd3c394a
VZ
31\twocolwidtha{7cm}
32\begin{twocollist}\itemsep=0pt
3195dca7 33\twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
dd3c394a
VZ
34when an item in the check list box is checked or unchecked.}
35\end{twocollist}
3972fb49
JS
36
37\wxheading{See also}
38
39\helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
40\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
41
42\latexignore{\rtfignore{\wxheading{Members}}}
43
44\membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxconstr}
45
46\func{}{wxCheckListBox}{\void}
47
48Default constructor.
49
50\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
51\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
52\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
53\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
54
56b88f12
MB
55\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
56\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
57\param{const wxArrayString\& }{choices},\rtfsp
58\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
59
3972fb49
JS
60Constructor, creating and showing a list box.
61
62\wxheading{Parameters}
63
64\docparam{parent}{Parent window. Must not be NULL.}
65
66\docparam{id}{Window identifier. A value of -1 indicates a default value.}
67
68\docparam{pos}{Window position.}
69
70\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
71appropriately.}
72
73\docparam{n}{Number of strings with which to initialise the control.}
74
75\docparam{choices}{An array of strings with which to initialise the control.}
76
77\docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
78
79\docparam{validator}{Window validator.}
80
81\docparam{name}{Window name.}
82
c9110876
VS
83\pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
84and {\tt choices} arguments are to a single argument, which is
06d20283
RD
85a list of strings.}
86
5873607e
VZ
87\perlnote{In wxPerl there is just an array reference in place of {\tt n}
88and {\tt choices}.}
89
3972fb49
JS
90\membersection{wxCheckListBox::\destruct{wxCheckListBox}}
91
92\func{void}{\destruct{wxCheckListBox}}{\void}
93
94Destructor, destroying the list box.
95
96\membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
97
cc81d32f 98\func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
3972fb49 99
e2ca995f
VZ
100Checks the given item. Note that calling this method doesn't result in
101wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
3972fb49
JS
102
103\wxheading{Parameters}
104
105\docparam{item}{Index of item to check.}
106
cc81d32f 107\docparam{check}{true if the item is to be checked, false otherwise.}
3972fb49
JS
108
109\membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
110
111\constfunc{bool}{IsChecked}{\param{int}{ item}}
112
cc81d32f 113Returns true if the given item is checked, false otherwise.
3972fb49
JS
114
115\wxheading{Parameters}
116
117\docparam{item}{Index of item whose check status is to be returned.}
118
119