\wxheading{Derived from}
+\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
Destructor, destroying the choice item.
-\membersection{wxChoice::Append}\label{wxchoiceappend}
-
-\func{int}{Append}{\param{const wxString\& }{ item}}
-
-Adds the item to the end of the choice control.
-
-\func{int}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
-
-Adds the item to the end of the combobox, associating the given data
-with the item.
-
-\wxheading{Parameters}
-
-\docparam{item}{String to add.}
-
-\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{wxChoice::Clear}\label{wxchoiceclear}
-
-\func{void}{Clear}{\void}
-
-Clears the strings from the choice item.
-
\membersection{wxChoice::Create}\label{wxchoicecreate}
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\docparam{n}{The item to delete.}
-\membersection{wxChoice::FindString}\label{wxchoicefindstring}
-
-\constfunc{int}{FindString}{\param{const wxString\& }{string}}
-
-Finds a choice matching the given string.
-
-\wxheading{Parameters}
-
-\docparam{string}{String to find.}
-
-\wxheading{Return value}
-
-Returns the position if found, or -1 if not found.
-
\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
\constfunc{int}{GetColumns}{\void}
\wxheading{Remarks}
-This is implemented for Motif only.
-
-\membersection{wxChoice::GetClientData}\label{wxchoicegetclientdata}
-
-\constfunc{void*}{GetClientData}{\param{int}{ n}}
-
-Returns a pointer to the client data associated with the given item (if any).
-
-\wxheading{Parameters}
-
-\docparam{n}{An item, starting from zero.}
-
-\wxheading{Return value}
-
-A pointer to the client data, or NULL if the item was not found.
-
-\membersection{wxChoice::GetCount}\label{wxchoicegetcount}
-
-\constfunc{int}{GetCount}{\void}
-
-Returns the number of items in the choice.
-
-\membersection{wxChoice::GetSelection}\label{wxchoicegetselection}
-
-\constfunc{int}{GetSelection}{\void}
-
-Gets the id (position) of the selected string, or -1 if there is no selection.
-
-\membersection{wxChoice::GetString}\label{wxchoicegetstring}
-
-\constfunc{wxString}{GetString}{\param{int}{ n}}
-
-Returns the string at the given position.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based position.}
-
-\wxheading{Return value}
-
-The string at the given position, or the empty string if {\it n} is invalid.
-
-\membersection{wxChoice::GetStringSelection}\label{wxchoicegetstringselection}
-
-\constfunc{wxString}{GetStringSelection}{\void}
-
-Gets the selected string, or the empty string if no string is selected.
-
-\membersection{wxChoice::Number}\label{wxchoicenumber}
-
-\constfunc{int}{Number}{\void}
-
-{\bf Obsolescence note:} This method is obsolete and was replaced with
-\helpref{GetCount}{wxchoicegetcount}, 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 strings in the choice control.
-
-\membersection{wxChoice::SetClientData}\label{wxchoicesetclientdata}
-
-\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
-
-Associates the given client data pointer with the given item.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item.}
-
-\docparam{data}{The client data.}
+This is implemented for Motif only and always returns $1$ for the other
+platforms.
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
\wxheading{Remarks}
-This is implemented for Motif only.
-
-\membersection{wxChoice::SetSelection}\label{wxchoicesetselection}
-
-\func{void}{SetSelection}{\param{int}{ n}}
-
-Sets the choice by passing the desired string position. This does not cause
-a wxEVT\_COMMAND\_CHOICE\_SELECTED event to get emitted.
-
-\wxheading{Parameters}
-
-\docparam{n}{The string position to select, starting from zero.}
-
-\wxheading{See also}
-
-\membersection{wxChoice::SetString}\label{wxchoicesetstring}
-
-\func{void}{SetString}{\param{int }{n}, \param{const wxString\& }{text}}
-
-Replaces the specified string in the control with another one.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based index of the string to replace}
-
-\docparam{text}{The new value for this item}
-
-{\bf NB:} This method is currently not implemented in wxGTK.
-
-\helpref{wxChoice::SetStringSelection}{wxchoicesetstringselection}
-
-\membersection{wxChoice::SetStringSelection}\label{wxchoicesetstringselection}
-
-\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
-
-Sets the choice by passing the desired string. This does not cause
-a wxEVT\_COMMAND\_CHOICE\_SELECTED event to get emitted.
-
-\wxheading{Parameters}
-
-\docparam{string}{The string to select.}
-
-\wxheading{See also}
-
-\helpref{wxChoice::SetSelection}{wxchoicesetselection}
-
+This is implemented for Motif only and doesn't do anything under other
+platforms.
\wxheading{Derived from}
+\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxChoice}{wxchoice}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
Destructor, destroying the combobox.
-\membersection{wxComboBox::Append}\label{wxcomboboxappend}
-
-\func{int}{Append}{\param{const wxString\& }{item}}
-
-Adds the item to the end of the combobox.
-
-\func{int}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
-
-Adds the item to the end of the combobox, associating the given data
-with the item.
-
-\wxheading{Parameters}
-
-\docparam{item}{The string to add.}
-
-\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{wxComboBox::Clear}\label{wxcomboboxclear}
-
-\func{void}{Clear}{\void}
-
-Clears all strings from the combobox.
-
\membersection{wxComboBox::Create}\label{wxcomboboxcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
Copies the selected text to the clipboard and removes the selection.
-\membersection{wxComboBox::Delete}\label{wxcomboboxdelete}
-
-\func{void}{Delete}{\param{int}{ n}}
-
-Deletes an item from the combobox.
-
-\wxheading{Parameters}
-
-\docparam{n}{The item to delete, starting from zero.}
-
-\membersection{wxComboBox::FindString}\label{wxcomboboxfindstring}
-
-\func{int}{FindString}{\param{const wxString\& }{string}}
-
-Finds a choice matching the given string.
-
-\wxheading{Parameters}
-
-\docparam{string}{The item to find.}
-
-\wxheading{Return value}
-
-The position if found, or -1 if not found.
-
-\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata}
-
-\constfunc{void*}{GetClientData}{\param{int}{ n}}
-
-Returns a pointer to the client data associated with the given item (if any).
-
-\wxheading{Parameters}
-
-\docparam{n}{An item, starting from zero.}
-
-\wxheading{Return value}
-
-A pointer to the client data, or NULL if the item was not found.
-
-\membersection{wxComboBox::GetCount}\label{wxcomboboxgetcount}
-
-\constfunc{int}{GetCount}{\void}
-
-Returns the number of items in the combobox.
-
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
\constfunc{long}{GetInsertionPoint}{\void}
Returns the last position in the combobox text field.
-\membersection{wxComboBox::GetSelection}\label{wxcomboboxgetselection}
-
-\constfunc{int}{GetSelection}{\void}
-
-Gets the position of the selected string, or -1 if there is no selection.
-
-\membersection{wxComboBox::GetString}\label{wxcomboboxgetstring}
-
-\constfunc{wxString}{GetString}{\param{int}{ n}}
-
-Returns the string at position {\it n}.
-
-\wxheading{Parameters}
-
-\docparam{n}{The item position, starting from zero.}
-
-\wxheading{Return value}
-
-The string if the item is found, otherwise the empty string.
-
-\membersection{wxComboBox::GetStringSelection}\label{wxcomboboxgetstringselection}
-
-\constfunc{wxString}{GetStringSelection}{\void}
-
-Gets the selected string.
-
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns the current value in the combobox text field.
-\membersection{wxComboBox::Number}\label{wxcomboboxnumber}
-
-\constfunc{int}{Number}{\void}
-
-{\bf Obsolescence note:} This method is obsolete and was replaced with
-\helpref{GetCount}{wxcomboboxgetcount}, 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 combobox list.
-
\membersection{wxComboBox::Paste}\label{wxcomboboxpaste}
\func{void}{Paste}{\void}
\docparam{to}{The last position.}
-\membersection{wxComboBox::SetClientData}\label{wxcomboboxsetclientdata}
-
-\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
-
-Associates the given client data pointer with the given item.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item.}
-
-\docparam{data}{The client data.}
-
\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint}
\func{void}{SetInsertionPoint}{\param{long}{ pos}}
\membersection{wxComboBox::SetSelection}\label{wxcomboboxsetselection}
-\func{void}{SetSelection}{\param{int}{ n}}
-
-Selects the given item in the combobox list. This does not cause a
-wxEVT\_COMMAND\_COMBOBOX\_SELECTED event to get emitted.
-
\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}
Selects the text between the two positions, in the combobox text field.
\wxheading{Parameters}
-\docparam{n}{The zero-based item to select.}
-
\docparam{from}{The first position.}
\docparam{to}{The second position.}
-\pythonnote{The second form of this method is called {\tt SetMark} in
-wxPython.}
-
-\membersection{wxComboBox::SetString}\label{wxcomboboxsetstring}
-
-\func{void}{SetString}{\param{int }{n}, \param{const wxString\& }{text}}
-
-Replaces the specified string in the control with another one.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based index of the string to replace}
-
-\docparam{text}{The new value for this item}
-
-{\bf NB:} This method is currently not implemented in wxGTK.
+\pythonnote{This method is called {\tt SetMark} in wxPython, {\tt SetSelection}
+name is kept for
+\helpref{wxControlWithItems::SetSelection}{wxcontrolwithitemssetselection}.}
\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue}
--- /dev/null
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: ctrlsub.tex
+%% Purpose: wxControlWithItems documentation
+%% Author: Vadim Zeitlin
+%% Modified by:
+%% Created: 01.01.03
+%% RCS-ID: $Id$
+%% Copyright: (c) 2003 Vadim Zeitlin
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxControlWithItems}}\label{wxcontrolwithitems}
+
+This class is an abstract base class for some wxWindows controls which contain
+several items, such as \helpref{wxListBox}{wxlistbox} and
+\helpref{wxCheckListBox}{wxchecklistbox} derived from it,
+\helpref{wxChoice}{wxchoice} and \helpref{wxComboBox}{wxcombobox}.
+
+It defines the methods for accessing the controls items and although each of
+the derived classes implements them differently, they still all conform to the
+same interface.
+
+The items in a wxControlWithItems have (non empty) string labels and,
+optionally, client data associated with them. Client data may be of two
+different kinds: either simple untyped ({\tt void *}) pointers which are simply
+stored by the control but not used in any way by it, or typed pointers
+({\tt wxClientData *}) which are owned by the control meaning that the typed
+client data (and only it) will be deleted when an item is
+\helpref{deleted}{wxcontrolwithitemsdelete} or the entire control is
+\helpref{cleared}{wxcontrolwithitemsclear} (which also happens when it is
+destroyed). Finally note that in the same control all items must have client
+data of the same type (typed or untyped), if any. This type is determined by
+the first call to \helpref{Append}{wxcontrolwithitemsappend} (the version with
+client data pointer) or \helpref{SetClientData}{wxcontrolwithitemssetclientdata}.
+
+\wxheading{Derived from}
+
+\helpref{wxControl}{wxcontrol}\\
+\helpref{wxWindow}{wxwindow}\\
+\helpref{wxEvtHandler}{wxevthandler}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/ctrlsub.h> but usually never included directly
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxControlWithItems::Append}\label{wxcontrolwithitemsappend}
+
+\func{int}{Append}{\param{const wxString\& }{ item}}
+
+Adds the item to the end of the list box.
+
+\func{int}{Append}{\param{const wxString\& }{ item}, \param{void *}{clientData}}
+
+\func{int}{Append}{\param{const wxString\& }{ item}, \param{wxClientData *}{clientData}}
+
+Adds the item to the end of the list box, associating the given, typed or
+untyped, client data pointer with the item.
+
+\func{void}{Append}{\param{const wxArrayString\& }{strings}}
+
+Appends several items at once to the control. Notice that calling this method
+may be much faster than appending the items one by one if you need to add a lot
+of items.
+
+\wxheading{Parameters}
+
+\docparam{item}{String to add.}
+
+\docparam{clientData}{Client data to associate with the item.}
+
+\wxheading{Return value}
+
+When appending a single item, the return value is the index of the newly added
+item which may be different from the last one if the control is sorted (e.g.
+has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style).
+
+\membersection{wxControlWithItems::Clear}\label{wxcontrolwithitemsclear}
+
+\func{void}{Clear}{\void}
+
+Removes all items from the control.
+
+{\it Clear()} also deletes the client data of the existing items if it is owned
+by the control.
+
+\membersection{wxControlWithItems::Delete}\label{wxcontrolwithitemsdelete}
+
+\func{void}{Delete}{\param{int}{ n}}
+
+Deletes an item from the control. The client data associated with the item
+will be also deleted if it is owned by the control.
+
+Note that it is an error (signalled by an assert failure in debug builds) to
+remove an item with the index negative or greater or equal than the number of
+items in the control.
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based item index.}
+
+\wxheading{See also}
+
+\helpref{Clear}{wxcontrolwithitemsclear}
+
+\membersection{wxControlWithItems::FindString}\label{wxcontrolwithitemsfindstring}
+
+\func{int}{FindString}{\param{const wxString\& }{string}}
+
+Finds an item whose label matches the given string.
+
+\wxheading{Parameters}
+
+\docparam{string}{String to find.}
+
+\wxheading{Return value}
+
+The zero-based position of the item, or {\tt wxNOT\_FOUND} if the string was
+not found.
+
+
+\membersection{wxControlWithItems::GetClientData}\label{wxcontrolwithitemsgetclientdata}
+
+\constfunc{void *}{GetClientData}{\param{int}{ n}}
+
+Returns a pointer to the client data associated with the given item (if any).
+It is an error to call this function for a control which doesn't have untyped
+client data at all although it is ok to call it even if the given item doesn't
+have any client data associated with it (but other items do).
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based position of the item.}
+
+\wxheading{Return value}
+
+A pointer to the client data, or {\tt NULL} if not present.
+
+
+\membersection{wxControlWithItems::GetClientObject}\label{wxcontrolwithitemsgetclientobject}
+
+\constfunc{wxClientData *}{GetClientObject}{\param{int}{ n}}
+
+Returns a pointer to the client data associated with the given item (if any).
+It is an error to call this function for a control which doesn't have typed
+client data at all although it is ok to call it even if the given item doesn't
+have any client data associated with it (but other items do).
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based position of the item.}
+
+\wxheading{Return value}
+
+A pointer to the client data, or {\tt NULL} if not present.
+
+
+\membersection{wxControlWithItems::GetCount}\label{wxcontrolwithitemsgetcount}
+
+\constfunc{int}{GetCount}{\void}
+
+Returns the number of items in the control.
+
+\wxheading{See also}
+
+\helpref{IsEmpty}{wxcontrolwithitemsisempty}
+
+
+\membersection{wxControlWithItems::GetSelection}\label{wxcontrolwithitemsgetselection}
+
+\constfunc{int}{GetSelection}{\void}
+
+Returns the index of the selected item or {\tt wxNOT\_FOUND} if no item is
+selected.
+
+\wxheading{Return value}
+
+The position of the current selection.
+
+\wxheading{Remarks}
+
+This method can be used with single selection list boxes only, you should use
+\helpref{wxListBox::GetSelections}{wxlistboxgetselections} for the list boxes
+with {\tt wxLB\_MULTIPLE} style.
+
+\wxheading{See also}
+
+\helpref{SetSelection}{wxcontrolwithitemssetselection},\rtfsp
+\helpref{GetStringSelection}{wxcontrolwithitemsgetstringselection}
+
+
+\membersection{wxControlWithItems::GetString}\label{wxcontrolwithitemsgetstring}
+
+\constfunc{wxString}{GetString}{\param{int}{ n}}
+
+Returns the label of the item with the given index.
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based index.}
+
+\wxheading{Return value}
+
+The label of the item or an empty string if the position was invalid.
+
+
+\membersection{wxControlWithItems::GetStringSelection}\label{wxcontrolwithitemsgetstringselection}
+
+\constfunc{wxString}{GetStringSelection}{\void}
+
+Returns the label of the selected item or an empty string if no item is
+selected.
+
+\wxheading{See also}
+
+\helpref{GetSelection}{wxcontrolwithitemsgetselection}
+
+
+\membersection{wxControlWithItems::IsEmpty}\label{wxcontrolwithitemsisempty}
+
+\constfunc{bool}{IsEmpty}{\void}
+
+Returns {\tt TRUE} if the control is empty or {\tt FALSE} if it has some items.
+
+\wxheading{See also}
+
+\helpref{GetCount}{wxcontrolwithitemsgetcount}
+
+
+\membersection{wxControlWithItems::Number}\label{wxcontrolwithitemsnumber}
+
+\constfunc{int}{Number}{\void}
+
+{\bf Obsolescence note:} This method is obsolete and was replaced with
+\helpref{GetCount}{wxcontrolwithitemsgetcount}, 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.
+
+
+\membersection{wxControlWithItems::SetClientData}\label{wxcontrolwithitemssetclientdata}
+
+\func{void}{SetClientData}{\param{int}{ n}, \param{void *}{data}}
+
+Associates the given untyped client data pointer with the given item. Note that
+it is an error to call this function if any typed client data pointers had been
+associated with the control items before.
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based item index.}
+
+\docparam{data}{The client data to associate with the item.}
+
+
+\membersection{wxControlWithItems::SetClientObject}\label{wxcontrolwithitemssetclientobject}
+
+\func{void}{SetClientObject}{\param{int}{ n}, \param{wxClientData *}{data}}
+
+Associates the given typed client data pointer with the given item: the
+{\it data} object will be deleted when the item is deleted (either explicitly
+by using \helpref{Deletes}{wxcontrolwithitemsdelete} or implicitly when the
+control itself is destroyed).
+
+Note that it is an error to call this function if any untyped client data
+pointers had been associated with the control items before.
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based item index.}
+
+\docparam{data}{The client data to associate with the item.}
+
+
+\membersection{wxControlWithItems::SetSelection}\label{wxcontrolwithitemssetselection}
+
+\func{void}{SetSelection}{\param{int}{ n}}
+
+Sets the choice by passing the desired string position. This does not cause
+any command events to get emitted.
+
+\wxheading{Parameters}
+
+\docparam{n}{The string position to select, starting from zero.}
+
+\wxheading{See also}
+
+\helpref{SetString}{wxcontrolwithitemssetstring},\rtfsp
+\helpref{SetStringSelection}{wxcontrolwithitemssetstringselection}
+
+
+\membersection{wxControlWithItems::SetString}\label{wxcontrolwithitemssetstring}
+
+\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}}
+
+Sets the label for the given item.
+
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based item index.}
+
+\docparam{string}{The label to set.}
+
+
+\membersection{wxControlWithItems::SetStringSelection}\label{wxcontrolwithitemssetstringselection}
+
+\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
+
+Selects the item with the specified string in the control. This doesn't cause
+any command events being emitted.
+
+\wxheading{Parameters}
+
+\docparam{string}{The string to select.}
+
+\wxheading{See also}
+
+\helpref{SetSelection}{wxcontrolwithitemssetselection}
+
+
\wxheading{Derived from}
+\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
Destructor, destroying the list box.
-\membersection{wxListBox::Append}\label{wxlistboxappend}
-
-\func{int}{Append}{\param{const wxString\& }{ item}}
-
-Adds the item to the end of the list box.
-
-\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.
-
-\wxheading{Parameters}
-
-\docparam{item}{String to add.}
-
-\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}
-
-Clears all strings from the list box.
-
\membersection{wxListBox::Create}\label{wxlistboxcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
Creates the listbox for two-step construction. See \helpref{wxListBox::wxListBox}{wxlistboxconstr}\rtfsp
for further details.
-\membersection{wxListBox::Delete}\label{wxlistboxdelete}
-
-\func{void}{Delete}{\param{int}{ n}}
-
-Deletes an item from the listbox.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item index.}
-
\membersection{wxListBox::Deselect}\label{wxlistboxdeselect}
\func{void}{Deselect}{\param{int}{ n}}
This applies to multiple selection listboxes only.
-\membersection{wxListBox::FindString}\label{wxlistboxfindstring}
-
-\func{int}{FindString}{\param{const wxString\& }{string}}
-
-Finds an item matching the given string.
-
-\wxheading{Parameters}
-
-\docparam{string}{String to find.}
-
-\wxheading{Return value}
-
-The zero-based position of the item, or -1 if the string was not found.
-
-\membersection{wxListBox::GetClientData}\label{wxlistboxgetclientdata}
-
-\constfunc{void*}{GetClientData}{\param{int}{ n}}
-
-Returns a pointer to the client data associated with the given item (if any).
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based position of the item.}
-
-\wxheading{Return value}
-
-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}
-
-Gets the position of the selected item.
-
-\wxheading{Return value}
-
-The position of the current selection.
-
-\wxheading{Remarks}
-
-Applicable to single selection list boxes only.
-
-\wxheading{See also}
-
-\helpref{wxListBox::SetSelection}{wxlistboxsetselection},\rtfsp
-\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
-\helpref{wxListBox::GetSelections}{wxlistboxgetselections}
-
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
\constfunc{int}{GetSelections}{\param{wxArrayInt\& }{selections}}
\wxheading{See also}
-\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp
-\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
-\helpref{wxListBox::SetSelection}{wxlistboxsetselection}
+\helpref{wxControlWithItems::GetSelection}{wxcontrolwithitemsgetselection},\rtfsp
+\helpref{wxControlWithItems::GetStringSelection}{wxcontrolwithitemsgetstringselection},\rtfsp
+\helpref{wxControlWithItems::SetSelection}{wxcontrolwithitemssetselection}
\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}}
-
-Returns the string at the given position.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based position.}
-
-\wxheading{Return value}
-
-The string, or an empty string if the position was invalid.
-
-\membersection{wxListBox::GetStringSelection}\label{wxlistboxgetstringselection}
-
-\constfunc{wxString}{GetStringSelection}{\void}
-
-Gets the selected string - for single selection list boxes only. This
-must be copied by the calling program if long term use is to be made of
-it.
-
-\wxheading{See also}
-
-\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp
-\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}}
\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}
\constfunc{bool}{Selected}{\param{int}{ n}}
You may free the array from the calling program after this function has been
called.
-\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata}
-
-\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
-
-Associates the given client data pointer with the given item.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item index.}
-
-\docparam{data}{The client data to associate with the item.}
-
\membersection{wxListBox::SetFirstItem}\label{wxlistboxsetfirstitem}
\func{void}{SetFirstItem}{\param{int}{ n}}
\docparam{string}{The string that should be visible.}
-\membersection{wxListBox::SetSelection}\label{wxlistboxsetselection}
-
-\func{void}{SetSelection}{\param{int}{ n}, \param{const bool }{select = TRUE}}
-
-Selects or deselects the given item. This does not cause a
-wxEVT\_COMMAND\_LISTBOX\_SELECT event to get emitted.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item index.}
-
-\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.}
-
-\membersection{wxListBox::SetString}\label{wxlistboxsetstring}
-
-\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}}
-
-Sets the string value of an item.
-
-\wxheading{Parameters}
-
-\docparam{n}{The zero-based item index.}
-
-\docparam{string}{The string to set.}
-
-\membersection{wxListBox::SetStringSelection}\label{wxlistboxsetstringselection}
-
-\func{void}{SetStringSelection}{\param{const wxString\& }{ string}, \param{const bool}{ select = TRUE}}
-
-Sets the current selection. This does not cause a
-wxEVT\_COMMAND\_LISTBOX\_SELECT event to get emitted.
-
-\wxheading{Parameters}
-
-\docparam{string}{The item to select.}
-
-\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.}
-