X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c54c79268ff605780cad4f13a6af9643ef0559a..8ae94823a3bf377614a5a67f750545217b6f6b8d:/src/cocoa/stattext.mm diff --git a/src/cocoa/stattext.mm b/src/cocoa/stattext.mm index ff30c7cb2f..29e247c9c9 100644 --- a/src/cocoa/stattext.mm +++ b/src/cocoa/stattext.mm @@ -34,7 +34,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid, if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; m_cocoaNSView = NULL; - SetNSTextField([[NSTextField alloc] initWithFrame:NSMakeRect(0,0,30,30)]); + SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSTextField() setStringValue:[NSString stringWithCString:label.c_str()]]; // [GetNSTextField() setBordered: NO]; @@ -50,6 +50,8 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid, if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; }