]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
at the moment built in 'old' textcontrol has better overall appearance, added fix...
[wxWidgets.git] / src / gtk1 / combobox.cpp
index e6190604055dc272d8640b39b321693118940be1..7660f4a9fa47db790490bf376103e86a2d88d512 100644 (file)
@@ -557,13 +557,14 @@ void wxComboBox::SetSelection( int n )
     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
@@ -779,7 +780,7 @@ wxSize wxComboBox::DoGetBestSize() const
         size_t count = GetCount();
         for ( size_t n = 0; n < count; n++ )
         {
-            GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
+            GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
             if ( width > ret.x )
                 ret.x = width;
         }