]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/listbox.tex
Added wxStaticBitmap::SetIcon()
[wxWidgets.git] / docs / latex / wx / listbox.tex
index eb4bb0593bfcf85e6f42ebb880b8afabbe394b2c..506d4cbe048dd89344bf29813aa739dc1fa97b32 100644 (file)
@@ -19,6 +19,10 @@ wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks.
 \helpref{wxEvtHandler}{wxevthandler}\\
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/listbox.h>
+
 \wxheading{Window styles}
 
 \twocolwidtha{5cm}%
@@ -42,7 +46,7 @@ See also \helpref{window styles overview}{windowstyles}.
 \begin{twocollist}\itemsep=0pt
 \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,
+\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED event,
 when the listbox is doubleclicked.}
 \end{twocollist}
 
@@ -91,6 +95,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
+a list of strings.}
+
+
+
 \membersection{wxListBox::\destruct{wxListBox}}
 
 \func{void}{\destruct{wxListBox}}{\void}
@@ -227,6 +237,9 @@ Use this with a multiple selection listbox.
 \helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
 \helpref{wxListBox::SetSelection}{wxlistboxsetselection}
 
+\pythonnote{The wxPython version of this method takes no parameters
+and returns a tuple of the selected items.}
+
 \membersection{wxListBox::GetString}\label{wxlistboxgetstring}
 
 \constfunc{wxString}{GetString}{\param{int}{ n}}
@@ -255,6 +268,21 @@ it.
 \helpref{wxListBox::GetSelections}{wxlistboxgetselections},\rtfsp
 \helpref{wxListBox::SetSelection}{wxlistboxsetselection}
 
+\membersection{wxListBox::InsertItems}\label{wxlistboxinsertitems}
+
+\func{void}{InsertItems}{\param{int}{ nItems}, \param{const wxString}{ items}, \param{int}{ pos}}
+
+Insert the given number of strings before the specified position.
+
+\wxheading{Parameters}
+
+\docparam{nItems}{Number of items in the array {\it items}}
+
+\docparam{items}{Labels of items to be inserted}
+
+\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}
+
 \membersection{wxListBox::Number}\label{wxlistboxnumber}
 
 \constfunc{int}{Number}{\void}
@@ -310,7 +338,7 @@ Associates the given client data pointer with the given item.
 
 \func{void}{SetFirstItem}{\param{const wxString\& }{string}}
 
-Set the specified item to be the first visible item.
+Set the specified item to be the first visible item. Windows only.
 
 \wxheading{Parameters}
 
@@ -322,7 +350,8 @@ Set the specified item to be the first visible item.
 
 \func{void}{SetSelection}{\param{int}{ n}, \param{const bool }{select = TRUE}}
 
-Selects or deselects the given item.
+Selects or deselects the given item. This does not cause a
+wxEVT\_COMMAND\_LISTBOX\_SELECT event to get emitted.
 
 \wxheading{Parameters}
 
@@ -346,7 +375,8 @@ Sets the string value of an item.
 
 \func{void}{SetStringSelection}{\param{const wxString\& }{ string}, \param{const bool}{ select = TRUE}}
 
-Sets the current selection.
+Sets the current selection. This does not cause a
+wxEVT\_COMMAND\_LISTBOX\_SELECT event to get emitted.
 
 \wxheading{Parameters}