X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/812edc25309a5f2e7fda349d9b135b512b6f03c5..f77e1e5d0d0eb7515425c2ad4daa1205674cb180:/src/cocoa/listbox.mm diff --git a/src/cocoa/listbox.mm b/src/cocoa/listbox.mm index 41bd84681b..4a00720bcc 100644 --- a/src/cocoa/listbox.mm +++ b/src/cocoa/listbox.mm @@ -13,6 +13,8 @@ #include "wx/listbox.h" #include "wx/log.h" +#import + IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase) END_EVENT_TABLE() @@ -29,6 +31,9 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID winid, if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; + SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]); + [m_cocoaNSView release]; + if(m_parent) m_parent->CocoaAddChild(this); return true; @@ -37,6 +42,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID winid, wxListBox::~wxListBox() { CocoaRemoveFromParent(); + SetNSView(NULL); } // pure virtuals from wxListBoxBase