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