1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxCheckListBox documentation
4 %% Author: wxWidgets Team
8 %% Copyright: (c) wxWidgets Team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxCheckListBox
}}\label{wxchecklistbox
}
14 A checklistbox is like a listbox, but allows items to be checked or unchecked.
16 When using this class under Windows wxWidgets must be compiled with USE
\_OWNER\_DRAWN set to
1.
18 Only the new functions for this class are documented; see also
\helpref{wxListBox
}{wxlistbox
}.
20 Please note that wxCheckListBox uses client data in its implementation,
21 and therefore this is not available to the application.
23 \wxheading{Derived from
}
25 \helpref{wxListBox
}{wxlistbox
}\\
26 \helpref{wxControl
}{wxcontrol
}\\
27 \helpref{wxWindow
}{wxwindow
}\\
28 \helpref{wxEvtHandler
}{wxevthandler
}\\
29 \helpref{wxObject
}{wxobject
}
31 \wxheading{Include files
}
37 \helpref{wxCore
}{librarieslist
}
39 \wxheading{Window styles
}
41 See
\helpref{wxListBox
}{wxlistbox
}.
43 \wxheading{Event handling
}
46 \begin{twocollist
}\itemsep=
0pt
47 \twocolitem{{\bf EVT
\_CHECKLISTBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
48 when an item in the check list box is checked or unchecked.
}
53 \helpref{wxListBox
}{wxlistbox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxComboBox
}{wxcombobox
},
\helpref{wxListCtrl
}{wxlistctrl
},
54 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
56 \latexignore{\rtfignore{\wxheading{Members
}}}
58 \membersection{wxCheckListBox::wxCheckListBox
}\label{wxchecklistboxctor
}
60 \func{}{wxCheckListBox
}{\void}
64 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
65 \param{const wxPoint\&
}{ pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
\rtfsp
66 \param{int
}{ n
},
\param{const wxString
}{choices
[] = NULL
},
\rtfsp
67 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
69 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
70 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
\rtfsp
71 \param{const wxArrayString\&
}{choices
},
\rtfsp
72 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
74 Constructor, creating and showing a list box.
76 \wxheading{Parameters
}
78 \docparam{parent
}{Parent window. Must not be NULL.
}
80 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
82 \docparam{pos
}{Window position.
}
84 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
87 \docparam{n
}{Number of strings with which to initialise the control.
}
89 \docparam{choices
}{An array of strings with which to initialise the control.
}
91 \docparam{style
}{Window style. See
\helpref{wxCheckListBox
}{wxchecklistbox
}.
}
93 \docparam{validator
}{Window validator.
}
95 \docparam{name
}{Window name.
}
97 \pythonnote{The wxCheckListBox constructor in wxPython reduces the
{\tt n
}
98 and
{\tt choices
} arguments are to a single argument, which is
101 \perlnote{In wxPerl there is just an array reference in place of
{\tt n
}
104 \membersection{wxCheckListBox::
\destruct{wxCheckListBox
}}\label{wxchecklistboxdtor
}
106 \func{void
}{\destruct{wxCheckListBox
}}{\void}
108 Destructor, destroying the list box.
110 \membersection{wxCheckListBox::Check
}\label{wxchecklistboxcheck
}
112 \func{void
}{Check
}{\param{int
}{item
},
\param{bool
}{ check = true
}}
114 Checks the given item. Note that calling this method doesn't result in
115 wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
117 \wxheading{Parameters
}
119 \docparam{item
}{Index of item to check.
}
121 \docparam{check
}{true if the item is to be checked, false otherwise.
}
123 \membersection{wxCheckListBox::IsChecked
}\label{wxchecklistboxischecked
}
125 \constfunc{bool
}{IsChecked
}{\param{unsigned int
}{ item
}}
127 Returns true if the given item is checked, false otherwise.
129 \wxheading{Parameters
}
131 \docparam{item
}{Index of item whose check status is to be returned.
}