]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/combobox.cpp
Disable typemap for wxImage constructors
[wxWidgets.git] / src / mac / carbon / combobox.cpp
index 7e6da680cf93c366b134af6a71f7d5c1b0908c6f..d653c99c059dd7a1ae1125923fc2f6e1d79eef3f 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_COMBOBOX
+
 #include "wx/combobox.h"
 #include "wx/button.h"
 #include "wx/menu.h"
@@ -330,7 +332,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
     if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
-                            wxDefaultValidator, name) )
+                            validator, name) )
     {
         return false;
     }
@@ -359,7 +361,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     }
 
     SetBestSize(size);   // Needed because it is a wxControlWithItems
-
+    SetStringSelection(value);
+    
     return true;
 }
 
@@ -565,18 +568,6 @@ wxString wxComboBox::GetStringSelection() const
         return wxEmptyString;
 }
 
-bool wxComboBox::SetStringSelection(const wxString& sel)
-{
-    int s = FindString (sel);
-    if (s > -1)
-        {
-            SetSelection (s);
-            return true;
-        }
-    else
-        return false;
-}
-
 void wxComboBox::SetString(int n, const wxString& s)
 {
     m_choice->SetString( n , s ) ;
@@ -656,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
     return noErr ;
 }
 
+#endif