X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3377b96271c1a0266006993a79671db1c1c9b043..513e0cea96dfcdc066d8b5b751c2874c7bf06a39:/docs/latex/wx/listbox.tex diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex index 0d8465cb80..07b133a76c 100644 --- a/docs/latex/wx/listbox.tex +++ b/docs/latex/wx/listbox.tex @@ -39,6 +39,10 @@ select multiple items using the SHIFT key and the mouse or special key combinati \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} @@ -48,7 +52,7 @@ See also \helpref{window styles overview}{windowstyles}. \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} @@ -194,6 +198,12 @@ Returns a pointer to the client data associated with the given item (if any). 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} @@ -241,7 +251,7 @@ Use this with a multiple selection listbox. \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 returna the +\perlnote{In wxPerl this method takes no parameters and return the selected items as a list.} \membersection{wxListBox::GetString}\label{wxlistboxgetstring} @@ -274,7 +284,7 @@ it. \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. @@ -297,6 +307,12 @@ and {\tt items}.} \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} @@ -315,9 +331,11 @@ TRUE if the given item is selected, FALSE otherwise. \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}}} -Clears the list box and adds the given strings. Not implemented for GTK. +\func{void}{Set}{\param{const wxArrayString\&}{ choices}, \param{void}{ **clientData = {\tt NULL}}} + +Clears the list box and adds the given strings to it. \wxheading{Parameters} @@ -325,10 +343,12 @@ Clears the list box and adds the given strings. Not implemented for GTK. \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}