#if wxUSE_LISTBOX
+#include "wx/listbox.h"
+
#ifndef WX_PRECOMP
- #include "wx/listbox.h"
#include "wx/dynarray.h"
#include "wx/arrstr.h"
#endif
bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
{
- int sel = FindString(s);
- wxCHECK_MSG( sel != wxNOT_FOUND, false,
- wxT("invalid string in SetStringSelection") );
+ const int sel = FindString(s);
+ if ( sel == wxNOT_FOUND )
+ return false;
SetSelection(sel, select);