X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d261710b8a6cf129d9670d640a4d5df3ca6c0cc..01ffa8f7f7acaf3851a436cf3e6975c43c46648c:/src/mac/carbon/statlmac.cpp?ds=sidebyside diff --git a/src/mac/carbon/statlmac.cpp b/src/mac/carbon/statlmac.cpp index 93644da485..34ca6e86cf 100644 --- a/src/mac/carbon/statlmac.cpp +++ b/src/mac/carbon/statlmac.cpp @@ -30,7 +30,7 @@ #include "wx/statline.h" #include "wx/statbox.h" -#include +#include "wx/mac/uma.h" // ============================================================================ // implementation @@ -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 = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 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; }