- return FALSE;
-
- Rect bounds ;
- Str255 title ;
-
- MacPreControlCreate( parent , id , "" , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ;
-
- m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
- kControlLittleArrowsProc , (long) this ) ;
-
- wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
-
- MacPostControlCreate() ;
-
- 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;