Get the currently selected item or $-1$ if there is no selection.
+\membersection{wxVListBox::GetSelectionBackground}\label{wxvlistboxgetselectionbackground}
+
+\constfunc{const wxColour\&}{GetSelectionBackground}{\void}
+
+Returns the background colour used for the selected cells. By default the
+standard system colour is used.
+
+\wxheading{See also}
+
+\helpref{wxSystemSettings::GetColour}{wxsystemsettingsgetcolour},\\
+\helpref{SetSelectionBackground}{wxvlistboxsetselectionbackground}
+
+
\membersection{wxVListBox::HasMultipleSelection}\label{wxvlistboxishasmultipleselection}
\constfunc{bool}{HasMultipleSelection}{\void}
unset. The selected item will be automatically scrolled into view if it isn't
currently visible.
+This method may be used both with single and multiple selection listboxes.
+
+
+\membersection{wxVListBox::SetSelectionBackground}\label{wxvlistboxsetselectionbackground}
+
+\func{void}{SetSelectionBackground}{\param{const wxColour\& }{col}}
+
+Sets the colour to be used for the selected cells background. The background of
+the standard cells may be changed by simply calling
+\helpref{SetBackgroundColour}{wxwindowsetbackgroundcolour}.
+
+\wxheading{See also}
+
+\helpref{GetSelectionBackground}{wxvlistboxgetselectionbackground}
+
\membersection{wxVListBox::Toggle}\label{wxvlistboxtoggle}
(selection >= 0 && (size_t)selection < GetItemCount()),
_T("wxVListBox::SetSelection(): invalid item index") );
- wxASSERT_MSG( !HasMultipleSelection(),
- _T("SetSelection() is invalid with multiselection listbox") );
+ if ( HasMultipleSelection() )
+ {
+ Select(selection);
+ m_anchor = selection;
+ }
DoSetCurrent(selection);
}