1998-09-06 10:43:36 -04:00
|
|
|
\section{\class{wxCheckListBox}}\label{wxchecklistbox}
|
|
|
|
|
|
|
|
A checklistbox is like a listbox, but allows items to be checked or unchecked.
|
|
|
|
|
2005-03-01 04:24:56 -05:00
|
|
|
When using this class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
|
|
|
|
|
2004-03-23 15:31:28 -05:00
|
|
|
Please note that wxCheckListBox uses client data in its implementation,
|
|
|
|
and therefore this is not available to the application.
|
|
|
|
|
1998-09-06 10:43:36 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxListBox}{wxlistbox}\\
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/checklst.h>
|
|
|
|
|
1998-09-06 10:43:36 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
See \helpref{wxListBox}{wxlistbox}.
|
|
|
|
|
|
|
|
\wxheading{Event handling}
|
|
|
|
|
1999-02-28 10:35:51 -05:00
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2003-06-06 11:40:15 -04:00
|
|
|
\twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
|
1999-02-28 10:35:51 -05:00
|
|
|
when an item in the check list box is checked or unchecked.}
|
|
|
|
\end{twocollist}
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
|
|
|
|
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-10-04 11:13:52 -04:00
|
|
|
\membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxctor}
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\func{}{wxCheckListBox}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
|
|
|
\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
|
|
|
|
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
|
|
|
\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
|
|
|
|
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
|
|
|
|
|
2004-02-08 03:27:29 -05:00
|
|
|
\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
|
|
|
|
\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
|
|
|
|
\param{const wxArrayString\& }{choices},\rtfsp
|
|
|
|
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
|
|
|
|
|
1998-09-06 10:43:36 -04:00
|
|
|
Constructor, creating and showing a list box.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
|
|
|
|
|
|
|
\docparam{pos}{Window position.}
|
|
|
|
|
|
|
|
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
|
|
|
|
appropriately.}
|
|
|
|
|
|
|
|
\docparam{n}{Number of strings with which to initialise the control.}
|
|
|
|
|
|
|
|
\docparam{choices}{An array of strings with which to initialise the control.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
|
|
|
|
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
1999-12-25 15:34:56 -05:00
|
|
|
\pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
|
|
|
|
and {\tt choices} arguments are to a single argument, which is
|
1999-02-19 02:58:02 -05:00
|
|
|
a list of strings.}
|
|
|
|
|
2000-12-20 11:10:46 -05:00
|
|
|
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
|
|
|
|
and {\tt choices}.}
|
|
|
|
|
2004-10-04 11:13:52 -04:00
|
|
|
\membersection{wxCheckListBox::\destruct{wxCheckListBox}}\label{wxchecklistboxdtor}
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\func{void}{\destruct{wxCheckListBox}}{\void}
|
|
|
|
|
|
|
|
Destructor, destroying the list box.
|
|
|
|
|
|
|
|
\membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
|
1998-09-06 10:43:36 -04:00
|
|
|
|
2003-01-01 17:41:10 -05:00
|
|
|
Checks the given item. Note that calling this method doesn't result in
|
|
|
|
wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{item}{Index of item to check.}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\docparam{check}{true if the item is to be checked, false otherwise.}
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsChecked}{\param{int}{ item}}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if the given item is checked, false otherwise.
|
1998-09-06 10:43:36 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{item}{Index of item whose check status is to be returned.}
|
|
|
|
|
|
|
|
|