-BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
- EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
-END_EVENT_TABLE()
-
-#endif
-
-/*
- * Static box
- */
-
-bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name)
+
+bool wxStaticBox::Create( wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxString& name )
+{
+ m_macIsUserPane = false;
+
+ if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
+ return false;
+
+ m_label = label;
+
+ Rect bounds = wxMacGetBoundsForControl( this, pos, size );
+
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateGroupBoxControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, CFSTR(""),
+ true /*primary*/, m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ MacPostControlCreate( pos, size );
+
+ return true;
+}
+
+void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const