X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be6577566570876c0c00621ff98c786d7c6de80e..b6ac8ca0ffb862409011db7dda51242b46f89f39:/src/cocoa/choice.mm diff --git a/src/cocoa/choice.mm b/src/cocoa/choice.mm index 523b380cbd..dad736da5a 100644 --- a/src/cocoa/choice.mm +++ b/src/cocoa/choice.mm @@ -13,6 +13,8 @@ #include "wx/choice.h" #include "wx/log.h" +#import + 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; }