(clicking an item toggles the item on or off independently of other
selections).
-List box elements are numbered from zero.
+List box elements are numbered from zero. Their number is limited in
+some platforms (e.g. ca. 2000 on GTK).
A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECT for single clicks, and
wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks.
\twocolitem{\windowstyle{wxLB\_HSCROLL}}{Create horizontal scrollbar if contents are too wide (Windows only).}
\twocolitem{\windowstyle{wxLB\_ALWAYS\_SB}}{Always show a vertical scrollbar.}
\twocolitem{\windowstyle{wxLB\_NEEDED\_SB}}{Only create a vertical scrollbar if needed.}
-\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order.}
+\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order. No effect for GTK.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\helpref{wxListBox::Create}{wxlistboxcreate}, \helpref{wxValidator}{wxvalidator}
-\pythonnote{The wxListBox constructor in wxPython reduces the \tt{n}
-and \tt{choices} arguments are to a single argument, which is
+\pythonnote{The wxListBox constructor in wxPython reduces the {\tt n}
+and {\tt choices} arguments are to a single argument, which is
a list of strings.}
Adds the item to the end of the list box.
-\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
+\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
Adds the item to the end of the list box, associating the given data
with the item.
\membersection{wxListBox::GetClientData}\label{wxlistboxgetclientdata}
-\constfunc{char*}{GetClientData}{\param{int}{ n}}
+\constfunc{void*}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
-\constfunc{int}{GetSelections}{\param{wxArrayInt&}{selections}}
+\constfunc{int}{GetSelections}{\param{wxArrayInt\& }{selections}}
Fill an array of ints with the positions of the currently selected items.
\docparam{pos}{Position before which to insert the items: for example, if {\it pos} is 0 the items
will be inserted in the beginning of the listbox}
+\pythonnote{The first two parameters are collapsed into a single
+parameter for wxPython, which is a list of strings.}
+
\membersection{wxListBox::Number}\label{wxlistboxnumber}
\constfunc{int}{Number}{\void}
\func{void}{Set}{\param{int}{ n}, \param{const wxString*}{ choices}}
-Clears the list box and adds the given strings.
+Clears the list box and adds the given strings. Not implemented for GTK.
\wxheading{Parameters}
\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata}
-\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}}
+\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
Associates the given client data pointer with the given item.