Don't try to set the string selection if not found
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39303
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
label = wxGetStockLabel(id);
long ctrl_style = style & ~wxBU_ALIGN_MASK;
-
- wxASSERT_MSG( (ctrl_style & wxALIGN_MASK) == 0,
- _T("Some style conflicts with align flags") );
+ ctrl_style = ctrl_style & ~wxALIGN_MASK;
if((style & wxBU_RIGHT) == wxBU_RIGHT)
ctrl_style |= wxALIGN_RIGHT;
void wxComboListBox::SetStringValue(const wxString& value)
{
- if ( !value.empty() )
+ if ( !value.empty() && (FindString(value) != wxNOT_FOUND) )
wxListBox::SetStringSelection(value);
else
wxListBox::SetSelection(-1);