X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5f229692e1ef5b0cbdae2ceb5195c796a8ef7b3..708c45a6cef439edb007ca8f8329582244f152f5:/src/cocoa/statline2.mm diff --git a/src/cocoa/statline2.mm b/src/cocoa/statline2.mm index 8ad30c3250..b23deacc07 100644 --- a/src/cocoa/statline2.mm +++ b/src/cocoa/statline2.mm @@ -12,7 +12,7 @@ #include "wx/app.h" #include "wx/statline.h" -#import +#import IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase) @@ -27,16 +27,17 @@ bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, { if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; - SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]); + SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; + [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; } wxStaticLine::~wxStaticLine() { - CocoaRemoveFromParent(); - SetNSView(NULL); }