On 2012-03-01, at 4:18 PM, Sean McBride wrote:

> Hi all,
> 
> 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?

Off the top of my head, I would simply fence the NSSlider to zero when its 
value is within a given range from that value: on a change event, if (say) -5 ≤ 
0 ≤ 5, you can force the value to zero. You can then allow for finer tuning of 
the value by implementing the fencing only when the user moves the slides with 
the mouse, and instead allow any value when the user uses the arrow keys to 
reposition the slider's knob.


—Mt.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to