]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/checklst.tex
added wxPLURAL() macro
[wxWidgets.git] / docs / latex / wx / checklst.tex
1 \section{\class{wxCheckListBox}}\label{wxchecklistbox}
2
3 A checklistbox is like a listbox, but allows items to be checked or unchecked.
4
5 When using this class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
6
7 Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
8
9 Please note that wxCheckListBox uses client data in its implementation,
10 and therefore this is not available to the application.
11
12 \wxheading{Derived from}
13
14 \helpref{wxListBox}{wxlistbox}\\
15 \helpref{wxControl}{wxcontrol}\\
16 \helpref{wxWindow}{wxwindow}\\
17 \helpref{wxEvtHandler}{wxevthandler}\\
18 \helpref{wxObject}{wxobject}
19
20 \wxheading{Include files}
21
22 <wx/checklst.h>
23
24 \wxheading{Window styles}
25
26 See \helpref{wxListBox}{wxlistbox}.
27
28 \wxheading{Event handling}
29
30 \twocolwidtha{7cm}
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.}
34 \end{twocollist}
35
36 \wxheading{See also}
37
38 \helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
39 \rtfsp\helpref{wxCommandEvent}{wxcommandevent}
40
41 \latexignore{\rtfignore{\wxheading{Members}}}
42
43 \membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxctor}
44
45 \func{}{wxCheckListBox}{\void}
46
47 Default constructor.
48
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"}}
53
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"}}
58
59 Constructor, creating and showing a list box.
60
61 \wxheading{Parameters}
62
63 \docparam{parent}{Parent window. Must not be NULL.}
64
65 \docparam{id}{Window identifier. A value of -1 indicates a default value.}
66
67 \docparam{pos}{Window position.}
68
69 \docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
70 appropriately.}
71
72 \docparam{n}{Number of strings with which to initialise the control.}
73
74 \docparam{choices}{An array of strings with which to initialise the control.}
75
76 \docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
77
78 \docparam{validator}{Window validator.}
79
80 \docparam{name}{Window name.}
81
82 \pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
83 and {\tt choices} arguments are to a single argument, which is
84 a list of strings.}
85
86 \perlnote{In wxPerl there is just an array reference in place of {\tt n}
87 and {\tt choices}.}
88
89 \membersection{wxCheckListBox::\destruct{wxCheckListBox}}\label{wxchecklistboxdtor}
90
91 \func{void}{\destruct{wxCheckListBox}}{\void}
92
93 Destructor, destroying the list box.
94
95 \membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
96
97 \func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
98
99 Checks the given item. Note that calling this method doesn't result in
100 wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
101
102 \wxheading{Parameters}
103
104 \docparam{item}{Index of item to check.}
105
106 \docparam{check}{true if the item is to be checked, false otherwise.}
107
108 \membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
109
110 \constfunc{bool}{IsChecked}{\param{int}{ item}}
111
112 Returns true if the given item is checked, false otherwise.
113
114 \wxheading{Parameters}
115
116 \docparam{item}{Index of item whose check status is to be returned.}
117
118