X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76e1c2debfe9558f79ab7c6cd2be1afc8b9d42c1..a9249b2eb2a40d8c71f828669045c4ddaa8dc5ff:/docs/latex/wx/listbox.tex diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex index af66b1a91c..c7707cb4aa 100644 --- a/docs/latex/wx/listbox.tex +++ b/docs/latex/wx/listbox.tex @@ -7,7 +7,8 @@ is selected, the previous selection is removed) or multiple selection (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. @@ -35,9 +36,13 @@ select multiple items using the SHIFT key and the mouse or special key combinati \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} @@ -95,11 +100,12 @@ appropriately.} \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.} - +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}.} \membersection{wxListBox::\destruct{wxListBox}} @@ -214,7 +220,7 @@ Applicable to single selection list boxes only. \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. @@ -239,6 +245,9 @@ 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 +selected items as a list.} + \membersection{wxListBox::GetString}\label{wxlistboxgetstring} \constfunc{wxString}{GetString}{\param{int}{ n}} @@ -285,6 +294,9 @@ 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.} +\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}