]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/combobox.mm
Digital Mars compilation warnings and Unicode fixes (patch 884587)
[wxWidgets.git] / src / cocoa / combobox.mm
index 4101d8f3d5b199e4c779ba272b5d5e1d5f2b13b3..8500a22382b4afebf4d5e2863c2fcf3b4f5106ed 100644 (file)
@@ -27,6 +27,21 @@ BEGIN_EVENT_TABLE(wxComboBox, wxTextCtrl)
 END_EVENT_TABLE()
 // WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView)
 
+bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
+            const wxString& value,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style,
+            const wxValidator& validator,
+            const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, winid, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
+}
+
 bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
             const wxString& value,
             const wxPoint& pos,
@@ -41,12 +56,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;
 }
 
@@ -63,7 +80,7 @@ wxString wxComboBox::GetStringSelection()
     return wxEmptyString;
 }
 
-void wxComboBox::SetStringSelection(wxString& selection)
+void wxComboBox::SetStringSelection(const wxString& selection)
 {
 }