X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..34ea3c74912db9d9142c1af0342f911f748e128d:/src/mac/carbon/statlmac.cpp?ds=sidebyside

diff --git a/src/mac/carbon/statlmac.cpp b/src/mac/carbon/statlmac.cpp
index 2c01893e84..34ca6e86cf 100644
--- a/src/mac/carbon/statlmac.cpp
+++ b/src/mac/carbon/statlmac.cpp
@@ -49,15 +49,17 @@ bool wxStaticLine::Create( wxWindow *parent,
                            long style,
                            const wxString &name)
 {
-	Rect bounds ;
-	Str255 title ;
-	
-	MacPreControlCreate( parent , id ,  "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
-
-	m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, 
-	  	kControlSeparatorLineProc , (long) this ) ;
-	
-	MacPostControlCreate() ;
+    m_macIsUserPane = FALSE ;
+    
+    if ( !wxStaticLineBase::Create(parent, id, pos, size,
+                                   style, wxDefaultValidator, name) )
+        return false;
+
+    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
+    m_peer = new wxMacControl() ;
+    verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, m_peer->GetControlRefAddr() ) ) ;  
+
+    MacPostControlCreate(pos,size) ;
 
     return TRUE;
 }