int Number() const { return GetCount(); }
void SetSelection( int n );
void Select( int n ) { return SetSelection( n ); }
- void SetStringSelection( const wxString &string );
+ bool SetStringSelection( const wxString &string );
void SetString(int n, const wxString &text);
wxString GetValue() const;
int Number() const { return GetCount(); }
void SetSelection( int n );
void Select( int n ) { return SetSelection( n ); }
- void SetStringSelection( const wxString &string );
+ bool SetStringSelection( const wxString &string );
void SetString(int n, const wxString &text);
wxString GetValue() const;
EnableEvents();
}
-void wxComboBox::SetStringSelection( const wxString &string )
+bool wxComboBox::SetStringSelection( const wxString &string )
{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
int res = FindString( string );
- if (res == -1) return;
+ if (res == -1) return false;
SetSelection( res );
+ return true;
}
wxString wxComboBox::GetValue() const
EnableEvents();
}
-void wxComboBox::SetStringSelection( const wxString &string )
+bool wxComboBox::SetStringSelection( const wxString &string )
{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
int res = FindString( string );
- if (res == -1) return;
+ if (res == -1) return false;
SetSelection( res );
+ return true;
}
wxString wxComboBox::GetValue() const