1 \section{\class{wxCheckListBox
}}\label{wxchecklistbox
}
3 A checklistbox is like a listbox, but allows items to be checked or unchecked.
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.
8 Only the new functions for this class are documented; see also
\helpref{wxListBox
}{wxlistbox
}.
10 Please note that wxCheckListBox uses client data in its implementation,
11 and therefore this is not available to the application.
13 \wxheading{Derived from
}
15 \helpref{wxListBox
}{wxlistbox
}\\
16 \helpref{wxControl
}{wxcontrol
}\\
17 \helpref{wxWindow
}{wxwindow
}\\
18 \helpref{wxEvtHandler
}{wxevthandler
}\\
19 \helpref{wxObject
}{wxobject
}
21 \wxheading{Include files
}
25 \wxheading{Window styles
}
27 See
\helpref{wxListBox
}{wxlistbox
}.
29 \wxheading{Event handling
}
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.
}
39 \helpref{wxListBox
}{wxlistbox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxComboBox
}{wxcombobox
},
\helpref{wxListCtrl
}{wxlistctrl
},
40 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxCheckListBox::wxCheckListBox
}\label{wxchecklistboxctor
}
46 \func{}{wxCheckListBox
}{\void}
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"
}}
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"
}}
60 Constructor, creating and showing a list box.
62 \wxheading{Parameters
}
64 \docparam{parent
}{Parent window. Must not be NULL.
}
66 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
68 \docparam{pos
}{Window position.
}
70 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
73 \docparam{n
}{Number of strings with which to initialise the control.
}
75 \docparam{choices
}{An array of strings with which to initialise the control.
}
77 \docparam{style
}{Window style. See
\helpref{wxCheckListBox
}{wxchecklistbox
}.
}
79 \docparam{validator
}{Window validator.
}
81 \docparam{name
}{Window name.
}
83 \pythonnote{The wxCheckListBox constructor in wxPython reduces the
{\tt n
}
84 and
{\tt choices
} arguments are to a single argument, which is
87 \perlnote{In wxPerl there is just an array reference in place of
{\tt n
}
90 \membersection{wxCheckListBox::
\destruct{wxCheckListBox
}}\label{wxchecklistboxdtor
}
92 \func{void
}{\destruct{wxCheckListBox
}}{\void}
94 Destructor, destroying the list box.
96 \membersection{wxCheckListBox::Check
}\label{wxchecklistboxcheck
}
98 \func{void
}{Check
}{\param{int
}{item
},
\param{bool
}{ check = true
}}
100 Checks the given item. Note that calling this method doesn't result in
101 wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
103 \wxheading{Parameters
}
105 \docparam{item
}{Index of item to check.
}
107 \docparam{check
}{true if the item is to be checked, false otherwise.
}
109 \membersection{wxCheckListBox::IsChecked
}\label{wxchecklistboxischecked
}
111 \constfunc{bool
}{IsChecked
}{\param{int
}{ item
}}
113 Returns true if the given item is checked, false otherwise.
115 \wxheading{Parameters
}
117 \docparam{item
}{Index of item whose check status is to be returned.
}