From: David Elliott Date: Mon, 24 Mar 2003 19:34:48 +0000 (+0000) Subject: Create an NSView (in leiu of a real static line) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d5f229692e1ef5b0cbdae2ceb5195c796a8ef7b3 Create an NSView (in leiu of a real static line) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/statline2.mm b/src/cocoa/statline2.mm index aa99c74568..8ad30c3250 100644 --- a/src/cocoa/statline2.mm +++ b/src/cocoa/statline2.mm @@ -12,6 +12,8 @@ #include "wx/app.h" #include "wx/statline.h" +#import + IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase) END_EVENT_TABLE() @@ -25,7 +27,8 @@ bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, { if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; - m_cocoaNSView = NULL; + SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]); + [m_cocoaNSView release]; if(m_parent) m_parent->CocoaAddChild(this); return true; @@ -34,5 +37,6 @@ bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, wxStaticLine::~wxStaticLine() { CocoaRemoveFromParent(); + SetNSView(NULL); }