+ if ( bitmap.Ok() )
+ {
+ wxSize newSize = DoGetBestSize();
+ if ( width == wxDefaultCoord )
+ width = newSize.x;
+ if ( height == wxDefaultCoord )
+ height = newSize.y;
+ }
+
+ m_bmpNormal = bitmap;
+
+ OSStatus err = noErr;
+ ControlButtonContentInfo info;
+
+ Rect bounds = wxMacGetBoundsForControl( this, pos, size );
+ m_peer = new wxMacControl( this );
+
+#ifdef __WXMAC_OSX__
+ if ( HasFlag( wxBORDER_NONE ) )
+ {
+ wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef );
+ err = CreateIconControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()),
+ &bounds, &info, false, m_peer->GetControlRefAddr() );
+ }