- tickMarks /= 5; //keep the number of tickmarks from becoming unwieldly
-
- m_peer = new wxMacControl(this) ;
- verify_noerr ( CreateSliderControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
- value , minValue , maxValue , kControlSliderPointsDownOrRight , tickMarks , true /* liveTracking */ ,
- GetwxMacLiveScrollbarActionProc() , m_peer->GetControlRefAddr() ) );
+ tickMarks /= 5;
+
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateSliderControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
+ value, minValue, maxValue,
+ kControlSliderPointsDownOrRight,
+ (UInt16) tickMarks, true /* liveTracking */,
+ GetwxMacLiveScrollbarActionProc(),
+ m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ if (style & wxSL_VERTICAL)
+ // Forces SetSize to use the proper width
+ SetSizeHints(10, -1, 10, -1);
+ else
+ // Forces SetSize to use the proper height
+ SetSizeHints(-1, 10, -1, 10);