]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/combobox.mm
fixed spurious debug message when right clicking outside of any items area
[wxWidgets.git] / src / cocoa / combobox.mm
index 19575440febbe3e45d7e2e7654ec85d96d29ad6b..ae2b9015fdf4d2f7b2bb9c29e78b1f5203d10141 100644 (file)
@@ -9,6 +9,10 @@
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+#include "wx/wxprec.h"
+
+#if wxUSE_COMBOBOX
+
 #include "wx/app.h"
 #include "wx/combobox.h"
 #include "wx/log.h"
@@ -37,12 +41,14 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
         return false;
 
     m_cocoaNSView = NULL;
-    SetNSTextField([[NSComboBox alloc] initWithFrame:NSMakeRect(0,0,30,30)]);
+    SetNSTextField([[NSComboBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     [GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
     [GetNSControl() sizeToFit];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }
 
@@ -59,7 +65,7 @@ wxString wxComboBox::GetStringSelection()
     return wxEmptyString;
 }
 
-void wxComboBox::SetStringSelection(wxString& selection)
+void wxComboBox::SetStringSelection(const wxString& selection)
 {
 }
 
@@ -123,3 +129,4 @@ wxClientData* wxComboBox::DoGetItemClientObject(int) const
     return NULL;
 }
 
+#endif //wxUSE_COMBOBOX