]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/checklst.tex
On wxMac don't call Refresh from FullPaint as that is the biggest
[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 This class is currently implemented under Windows and GTK. When using this
6 class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
7
8 Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
9
10 Please note that wxCheckListBox uses client data in its implementation,
11 and therefore this is not available to the application.
12
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
21 \wxheading{Include files}
22
23 <wx/checklst.h>
24
25 \wxheading{Window styles}
26
27 See \helpref{wxListBox}{wxlistbox}.
28
29 \wxheading{Event handling}
30
31 \twocolwidtha{7cm}
32 \begin{twocollist}\itemsep=0pt
33 \twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
34 when an item in the check list box is checked or unchecked.}
35 \end{twocollist}
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{wxchecklistboxctor}
45
46 \func{}{wxCheckListBox}{\void}
47
48 Default 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
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
60 Constructor, 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
71 appropriately.}
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
83 \pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
84 and {\tt choices} arguments are to a single argument, which is
85 a list of strings.}
86
87 \perlnote{In wxPerl there is just an array reference in place of {\tt n}
88 and {\tt choices}.}
89
90 \membersection{wxCheckListBox::\destruct{wxCheckListBox}}\label{wxchecklistboxdtor}
91
92 \func{void}{\destruct{wxCheckListBox}}{\void}
93
94 Destructor, destroying the list box.
95
96 \membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
97
98 \func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
99
100 Checks the given item. Note that calling this method doesn't result in
101 wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
102
103 \wxheading{Parameters}
104
105 \docparam{item}{Index of item to check.}
106
107 \docparam{check}{true if the item is to be checked, false otherwise.}
108
109 \membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
110
111 \constfunc{bool}{IsChecked}{\param{int}{ item}}
112
113 Returns true if the given item is checked, false otherwise.
114
115 \wxheading{Parameters}
116
117 \docparam{item}{Index of item whose check status is to be returned.}
118
119