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{wxControlWithItems
}{wxcontrolwithitems
}\\
27 \helpref{wxControl
}{wxcontrol
}\\
28 \helpref{wxWindow
}{wxwindow
}\\
29 \helpref{wxEvtHandler
}{wxevthandler
}\\
30 \helpref{wxObject
}{wxobject
}
32 \wxheading{Include files
}
38 \helpref{wxCore
}{librarieslist
}
40 \wxheading{Window styles
}
42 See
\helpref{wxListBox
}{wxlistbox
}.
44 \wxheading{Event handling
}
47 \begin{twocollist
}\itemsep=
0pt
48 \twocolitem{{\bf EVT
\_CHECKLISTBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLED event,
49 when an item in the check list box is checked or unchecked.
}
54 \helpref{wxListBox
}{wxlistbox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxComboBox
}{wxcombobox
},
\helpref{wxListCtrl
}{wxlistctrl
},
55 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
57 \latexignore{\rtfignore{\wxheading{Members
}}}
59 \membersection{wxCheckListBox::wxCheckListBox
}\label{wxchecklistboxctor
}
61 \func{}{wxCheckListBox
}{\void}
65 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
66 \param{const wxPoint\&
}{ pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
\rtfsp
67 \param{int
}{ n
},
\param{const wxString
}{choices
[] = NULL
},
\rtfsp
68 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
70 \func{}{wxCheckListBox
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\rtfsp
71 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
\rtfsp
72 \param{const wxArrayString\&
}{choices
},
\rtfsp
73 \param{long
}{ style =
0},
\param{const wxValidator\&
}{validator = wxDefaultValidator
},
\param{const wxString\&
}{name = ``listBox"
}}
75 Constructor, creating and showing a list box.
77 \wxheading{Parameters
}
79 \docparam{parent
}{Parent window. Must not be NULL.
}
81 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
83 \docparam{pos
}{Window position.
}
85 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
88 \docparam{n
}{Number of strings with which to initialise the control.
}
90 \docparam{choices
}{An array of strings with which to initialise the control.
}
92 \docparam{style
}{Window style. See
\helpref{wxCheckListBox
}{wxchecklistbox
}.
}
94 \docparam{validator
}{Window validator.
}
96 \docparam{name
}{Window name.
}
98 \pythonnote{The wxCheckListBox constructor in wxPython reduces the
{\tt n
}
99 and
{\tt choices
} arguments are to a single argument, which is
102 \perlnote{In wxPerl there is just an array reference in place of
{\tt n
}
105 \membersection{wxCheckListBox::
\destruct{wxCheckListBox
}}\label{wxchecklistboxdtor
}
107 \func{void
}{\destruct{wxCheckListBox
}}{\void}
109 Destructor, destroying the list box.
111 \membersection{wxCheckListBox::Check
}\label{wxchecklistboxcheck
}
113 \func{void
}{Check
}{\param{int
}{item
},
\param{bool
}{ check = true
}}
115 Checks the given item. Note that calling this method doesn't result in
116 wxEVT
\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
118 \wxheading{Parameters
}
120 \docparam{item
}{Index of item to check.
}
122 \docparam{check
}{true if the item is to be checked, false otherwise.
}
124 \membersection{wxCheckListBox::IsChecked
}\label{wxchecklistboxischecked
}
126 \constfunc{bool
}{IsChecked
}{\param{unsigned int
}{ item
}}
128 Returns true if the given item is checked, false otherwise.
130 \wxheading{Parameters
}
132 \docparam{item
}{Index of item whose check status is to be returned.
}