SetSelection() may be used for both single and multi selection listboxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -249,8 +249,11 @@ void wxVListBox::SetSelection(int selection)
|
||||
(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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user