]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/combobox.cpp
fix wxString::Replace when new strings are longer than old string
[wxWidgets.git] / src / mac / carbon / combobox.cpp
index 7e83e671aad3c67c307385f36ed3c8f04836bf05..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;
 }
 
@@ -644,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
     return noErr ;
 }
 
+#endif