- m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1,
- kControlTabSmallProc , (long) this ) ;
-
- MacPostControlCreate() ;
- return TRUE ;
+ Rect bounds = wxMacGetBoundsForControl( this, pos, size );
+
+ UInt16 tabstyle = kControlTabDirectionNorth;
+ ControlTabSize tabsize = kControlTabSizeLarge;
+ if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL )
+ tabsize = kControlTabSizeSmall ;
+ else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI )
+ {
+ if (UMAGetSystemVersion() >= 0x1030 )
+ tabsize = 3 ;
+ else
+ tabsize = kControlSizeSmall;
+ }
+
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateTabsControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
+ tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ MacPostControlCreate( pos, size );
+
+ return true;