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