\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. No effect for GTK.}
+\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order.}
\end{twocollist}
+Note that {\tt wxLB\_SINGLE}, {\tt wxLB\_MULTIPLE} and {\tt wxLB\_EXTENDED}
+styles are mutually exclusive and you can specify at most one of them (single
+selection is the default).
+
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED event,
when an item on the list is selected.}
\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED event,
-when the listbox is doubleclicked.}
+when the listbox is double-clicked.}
\end{twocollist}
\wxheading{See also}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
-
+\perlnote{In wxPerl there is just an array reference in place of {\tt n}
+and {\tt choices}.}
\membersection{wxListBox::\destruct{wxListBox}}
\membersection{wxListBox::Append}\label{wxlistboxappend}
-\func{void}{Append}{\param{const wxString\& }{ item}}
+\func{int}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the list box.
-\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
+\func{int}{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.
\docparam{clientData}{Client data to associate with the item.}
+\wxheading{Return value}
+
+The index of the newly added item, may be different from the last one if the
+control has {\tt wxLB\_SORT} style.
+
\membersection{wxListBox::Clear}\label{wxlistboxclear}
\func{void}{Clear}{\void}
A pointer to the client data, or NULL if not present.
+\membersection{wxListBox::GetCount}\label{wxlistboxgetcount}
+
+\constfunc{int}{GetCount}{\void}
+
+Returns the number of items in the listbox.
+
\membersection{wxListBox::GetSelection}\label{wxlistboxgetselection}
\constfunc{int}{GetSelection}{\void}
\pythonnote{The wxPython version of this method takes no parameters
and returns a tuple of the selected items.}
+\perlnote{In wxPerl this method takes no parameters and return the
+selected items as a list.}
+
\membersection{wxListBox::GetString}\label{wxlistboxgetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
\membersection{wxListBox::InsertItems}\label{wxlistboxinsertitems}
-\func{void}{InsertItems}{\param{int}{ nItems}, \param{const wxString}{ items}, \param{int}{ pos}}
+\func{void}{InsertItems}{\param{int}{ nItems}, \param{const wxString}{ *items}, \param{int}{ pos}}
Insert the given number of strings before the specified position.
\pythonnote{The first two parameters are collapsed into a single
parameter for wxPython, which is a list of strings.}
+\perlnote{In wxPerl there is just an array reference in place of {\tt nItems}
+and {\tt items}.}
+
\membersection{wxListBox::Number}\label{wxlistboxnumber}
\constfunc{int}{Number}{\void}
+{\bf Obsolescence note:} This method is obsolete and was replaced with
+\helpref{GetCount}{wxlistboxgetcount}, please use the new method in the new
+code. This method is only available if wxWindows was compiled with
+{\tt WXWIN\_COMPATIBILITY\_2\_2} defined and will disappear completely in
+future versions.
+
Returns the number of items in the listbox.
\membersection{wxListBox::Selected}\label{wxlistboxselected}
\membersection{wxListBox::Set}\label{wxlistboxset}
-\func{void}{Set}{\param{int}{ n}, \param{const wxString*}{ choices}}
+\func{void}{Set}{\param{int}{ n}, \param{const wxString*}{ choices}, \param{void}{ **clientData = {\tt NULL}}}
+
+\func{void}{Set}{\param{const wxArrayString\&}{ choices}, \param{void}{ **clientData = {\tt NULL}}}
-Clears the list box and adds the given strings. Not implemented for GTK.
+Clears the list box and adds the given strings to it.
\wxheading{Parameters}
\docparam{choices}{An array of strings to set.}
+\docparam{clientData}{Options array of client data pointers}
+
\wxheading{Remarks}
-Deallocate the array from the calling program
-after this function has been called.
+You may free the array from the calling program after this function has been
+called.
\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata}