Re: Suggestions for forcing NSSlider to some values, without tickmarks
Re: Suggestions for forcing NSSlider to some values, without tickmarks
- Subject: Re: Suggestions for forcing NSSlider to some values, without tickmarks
- From: Quincey Morris <email@hidden>
- Date: Thu, 01 Mar 2012 16:56:44 -0800
On Mar 1, 2012, at 13:18 , Sean McBride wrote:
> I have a continuous linear NSSlider who's range is -180 to 180 degrees. I don't want tick marks because any value is acceptable. However, the value zero is important, and I need for the user to be able to get to exactly 0.0 (0.1 or whatever is no good).
>
> How would you suggest accomplishing this?
Use the action method (making sure isContinuous: is YES) and when the value is within about (0.5 * 360.0 / slider.bounds.width) of zero, set the slider value to 0?
If you want it to snap to 0, then use something like snapDistance * 360.0 / slider.bounds.width instead.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden