]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/choice.mm
more Unicode fixes
[wxWidgets.git] / src / cocoa / choice.mm
index 2f16f831fc8334079a76b2c8f326c77ac51fcdab..dad736da5a66de964db10e624f5af6dad9e435aa 100644 (file)
@@ -13,6 +13,8 @@
 #include "wx/choice.h"
 #include "wx/log.h"
 
+#import <AppKit/NSPopUpButton.h>
+
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
 BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
 END_EVENT_TABLE()
@@ -29,8 +31,14 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
 
+    SetNSView([[NSPopUpButton alloc] initWithFrame:MakeDefaultNSRect(size)
+        pullsDown: NO]);
+
+    [m_cocoaNSView sizeToFit];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }
 
@@ -76,6 +84,11 @@ int wxChoice::DoAppend(const wxString&)
     return 0;
 }
 
+int wxChoice::DoInsert(const wxString&, int)
+{
+    return 0;
+}
+
 void wxChoice::DoSetItemClientData(int, void*)
 {
 }