- m_windowId = (id < 0 ? NewControlId() : id);
-
- if (parent) parent->AddChild(this);
-
- // TODO: create tab control
- return FALSE;
+ m_imageList = NULL;
+
+ 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() ;
+ verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
+ tabsize , tabstyle, 0, NULL, m_peer->GetControlRefAddr() ) );
+
+
+ MacPostControlCreate(pos,size) ;
+ return TRUE ;