]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/stattext.mm
Keep order of nodes when wxHashMap is resized; this ensures
[wxWidgets.git] / src / cocoa / stattext.mm
index ff30c7cb2f1f82769e84de6a793b8a11720a0705..29e247c9c962632a6a546a62fa8815bb020c0628 100644 (file)
@@ -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;
 }