git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
		
			
				
	
	
		
			117 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			117 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
\section{\class{wxCheckBox}}\label{wxcheckbox}
 | 
						|
 | 
						|
A checkbox is a labelled box which is either on (checkmark is visible)
 | 
						|
or off (no checkmark).
 | 
						|
 | 
						|
\wxheading{Derived from}
 | 
						|
 | 
						|
\helpref{wxControl}{wxcontrol}\\
 | 
						|
\helpref{wxWindow}{wxwindow}\\
 | 
						|
\helpref{wxEvtHandler}{wxevthandler}\\
 | 
						|
\helpref{wxObject}{wxobject}
 | 
						|
 | 
						|
\wxheading{Include files}
 | 
						|
 | 
						|
<wx/checkbox.h>
 | 
						|
 | 
						|
\wxheading{Window styles}
 | 
						|
 | 
						|
There are no special styles for wxCheckBox.
 | 
						|
 | 
						|
See also \helpref{window styles overview}{windowstyles}.
 | 
						|
 | 
						|
\wxheading{Event handling}
 | 
						|
 | 
						|
\twocolwidtha{7cm}
 | 
						|
\begin{twocollist}\itemsep=0pt
 | 
						|
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
 | 
						|
when the checkbox is clicked.}
 | 
						|
\end{twocollist}
 | 
						|
 | 
						|
\wxheading{See also}
 | 
						|
 | 
						|
\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
 | 
						|
 | 
						|
\latexignore{\rtfignore{\wxheading{Members}}}
 | 
						|
 | 
						|
\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
 | 
						|
 | 
						|
\func{}{wxCheckBox}{\void}
 | 
						|
 | 
						|
Default constructor.
 | 
						|
 | 
						|
\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
 | 
						|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
 | 
						|
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
 | 
						|
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
 | 
						|
 | 
						|
Constructor, creating and showing a checkbox.
 | 
						|
 | 
						|
\wxheading{Parameters}
 | 
						|
 | 
						|
\docparam{parent}{Parent window. Must not be NULL.}
 | 
						|
 | 
						|
\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
 | 
						|
 | 
						|
\docparam{label}{Text to be displayed next to the checkbox.}
 | 
						|
 | 
						|
\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
 | 
						|
 | 
						|
\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
 | 
						|
 | 
						|
\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
 | 
						|
 | 
						|
\docparam{validator}{Window validator.}
 | 
						|
 | 
						|
\docparam{name}{Window name.}
 | 
						|
 | 
						|
\wxheading{See also}
 | 
						|
 | 
						|
\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
 | 
						|
 | 
						|
\membersection{wxCheckBox::\destruct{wxCheckBox}}
 | 
						|
 | 
						|
\func{}{\destruct{wxCheckBox}}{\void}
 | 
						|
 | 
						|
Destructor, destroying the checkbox.
 | 
						|
 | 
						|
\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
 | 
						|
 | 
						|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
 | 
						|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
 | 
						|
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
 | 
						|
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
 | 
						|
 | 
						|
Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
 | 
						|
for details.
 | 
						|
 | 
						|
\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
 | 
						|
 | 
						|
\constfunc{bool}{GetValue}{\void}
 | 
						|
 | 
						|
Gets the state of the checkbox.
 | 
						|
 | 
						|
\wxheading{Return value}
 | 
						|
 | 
						|
Returns {\tt TRUE} if it is checked, {\tt FALSE} otherwise.
 | 
						|
 | 
						|
\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
 | 
						|
 | 
						|
\constfunc{bool}{IsChecked}{\void}
 | 
						|
 | 
						|
This is just a maybe more readable synonym for 
 | 
						|
\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns 
 | 
						|
{\tt TRUE} if the checkbox is checked and {\tt FALSE} otherwise.
 | 
						|
 | 
						|
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
 | 
						|
 | 
						|
\func{void}{SetValue}{\param{const bool}{ state}}
 | 
						|
 | 
						|
Sets the checkbox to the given state. This does not cause a
 | 
						|
wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
 | 
						|
 | 
						|
\wxheading{Parameters}
 | 
						|
 | 
						|
\docparam{state}{If {\tt TRUE}, the check is on, otherwise it is off.}
 | 
						|
 |