-#if wxOSX_USE_CARBON
- Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
- m_peer = new wxMacControl(this) ;
-
- OSStatus err = CreateDisclosureTriangleControl(
- MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds,
- kControlDisclosureTrianglePointDefault,
- wxCFStringRef( label ),
- 0, // closed
- TRUE, // draw title
- TRUE, // auto toggle back and forth
- m_peer->GetControlRefAddr() );
-
- verify_noerr( err );
-#endif
- wxASSERT_MSG( m_peer != NULL && m_peer->IsOk() , wxT("No valid Mac control") ) ;
+ m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );