X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f033830e257227dc73225809de2326db0093e5fe..bb69632a56a827bed4cfae842bfffa88259ac1aa:/src/osx/cocoa/statbox.mm diff --git a/src/osx/cocoa/statbox.mm b/src/osx/cocoa/statbox.mm index 4ec49e32fa..3eca187518 100644 --- a/src/osx/cocoa/statbox.mm +++ b/src/osx/cocoa/statbox.mm @@ -16,6 +16,25 @@ #include "wx/statbox.h" #include "wx/osx/private.h" +@implementation wxNSBox + +- (void)setImplementation: (wxWidgetImpl *) theImplementation +{ + impl = theImplementation; +} + +- (wxWidgetImpl*) implementation +{ + return impl; +} + +- (BOOL) isFlipped +{ + return NO; +} + +@end + wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, @@ -25,12 +44,8 @@ wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, long style, long extraStyle) { - NSView* sv = (wxpeer->GetParent()->GetHandle() ); - - NSRect r = wxToNSRect( sv, wxRect( pos, size) ); - // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ; + NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; - [sv addSubview:v]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); [v setImplementation:c]; return c;