• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Suggestions for forcing NSSlider to some values, without tickmarks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Suggestions for forcing NSSlider to some values, without tickmarks (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: Suggestions for forcing NSSlider to some values, without tickmarks
  • Next by Date: Re: How are views supposed to reload after being nillified by memory warnings?
  • Previous by thread: Re: Suggestions for forcing NSSlider to some values, without tickmarks
  • Next by thread: Re: How are views supposed to reload after being nillified by memory warnings?
  • Index(es):
    • Date
    • Thread