- return FALSE;
-
- Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-
- m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 100,
- kControlLittleArrowsProc , (long) this ) ;
-
- wxASSERT_MSG( (ControlRef) m_macControl != NULL , wxT("No valid mac control") ) ;
-
- MacPostControlCreate(pos,size) ;
-
- return TRUE;
+ return false;
+
+ Rect bounds = wxMacGetBoundsForControl( this , pos , size );
+
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateLittleArrowsControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, 0, m_min, m_max, 1,
+ m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ m_peer->SetActionProc( GetwxMacLiveScrollbarActionProc() );
+ MacPostControlCreate( pos, size );
+
+ return true;