Questions tagged [nsslider]

NSSlider object belongs to Apple's class it displays a range of values. NSSlider can be used for volume control, colors selection, brightness adjust, etc.. It has continous and discrete modes.

An NSSlider object displays a range of values for something in the application. Sliders can be vertical or horizontal bars or circular dials. An indicator, or knob, notes the current setting. The user can move the knob in the slider’s bar—or rotate the knob in a circular slider to change the setting.

The NSSlider class uses the NSSliderCell class to implement its user interface.

NSSlider Class Reference.

85 questions
26
votes
3 answers

How can I get the value of an NSSlider continuously?

It seems like NSSlider in Cocoa does not provide a delegate to receive an event like Value Changed for a UISlider. How can I get the value of an NSSlider continuously and display it in an NSTextField, for example?
meddlesome
  • 551
  • 7
  • 20
19
votes
8 answers

Determine when NSSlider knob is 'let go' in continuous mode

I'm using an NSSlider control, and I've configured it to use continuous mode so that I can continually update an NSTextField with the current value of the slider while the user is sliding it around. The issue I have is that I don't want to 'commit'…
dbr
  • 487
  • 4
  • 10
15
votes
3 answers

change NSSlider Value programmatically

Is there a way to make an IBOutlet of an NSSlider and then be able to change its value programmatically? slider.value = ...does not work. Thanks!
Grant Wilkinson
  • 1,088
  • 1
  • 13
  • 38
14
votes
4 answers

Change NSSlider bar color

I've got an NSWindow and an horizontal NSSlider. I'd like to change the color of the right part of the slider bar when the window background color changes. Currently, the right part of the bar isn't visible anymore when the window background is…
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
11
votes
1 answer

nsslider.integerValue requires me to focus on another app before updating the value

I have an NSSlider in my macos app, called wave_mode_slider. What I'm trying to do is update the value of said slider on input. So, what I did is this: self.wave_mode_slider?.integerValue = ("\(params[2])" as NSString).integerValue This sets the…
sushibrain
  • 2,712
  • 5
  • 33
  • 62
8
votes
4 answers

custom NSSliderCell

I've sort of accomplised implementing a custom slider cell that can draw over using images for the scroll bar and knob. The only obstacle that is in the way now is this, when I drag the knob quickly, the images get messed up. I've posted a screen…
han
  • 531
  • 5
  • 18
7
votes
8 answers

Subclassing NSSlider: Need a workaround for missing mouse up events (Cocoa OSX)

I am trying to subclass NSSlider to create a control called a jog dial. Basically what I need is a slider which always starts at the middle and when it is moved to the left or right it will send notifications every so often (determined by an…
Mike2012
  • 7,629
  • 15
  • 84
  • 135
6
votes
3 answers

NSSlider animation

How can I create NSSlider animation when changing float value of it. I was trying: [[mySlider animator] setFloatValue:-5]; but that didn't work.. just change the value without animation. So maybe someone knows how to do this? Thanks in advance.
user1150322
6
votes
1 answer

How can NSSlider be customised to provide a non-linear scale in cocoa?

How can NSSlider be customised to provide a non-linear scale in cocoa? i.e - 0, 2, 4, 6, 10. With the slider constrained to stopping on tick marks only, I want the slider to stop on 0, 2, 4, 6, 10 (and not 8 for instance). Thanks.
Rhys Lewis
  • 453
  • 4
  • 20
6
votes
1 answer

NSUndoManager: redo not working

I am making a simple application that uses a NSSlider, which can be put to it's max or min value with two buttons.The undo manager shall track all changes and allow to undo/redo all changes made using these two buttons. Here is the interface: …
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187
5
votes
4 answers

NSSlider NSSliderCell clipping custom knob

I am creating a custom NSSlider with a custom NSSliderCell. All is working beautifully, other than the knob. When I drag it to the max value the knob is being clipped, I can only see 50% of the knob image. When assigning my custom NSSliderCell I am…
mootymoots
  • 4,545
  • 9
  • 46
  • 74
4
votes
1 answer

Creating a Custom NSSlider Based Off of QuickTIme X's Trim UI

http://f.cl.ly/items/350X3c0h0A0k3s3f1R1h/Screen%20Shot%202012-03-27%20at%202.53.41%20PM.png I'm working on an application that'll allow a user to select a range of time in a piece of audio for OS X. Most of the searching I've done around getting a…
Bryan Veloso
  • 1,595
  • 18
  • 34
4
votes
1 answer

OS X Lion scroll direction and NSSlider

My application has horizontal NSSlider acting as volume control and now with Lion's new "natural" (inverted) scroll direction it behaves wrong. When you slide to the left it moves to the right and vice versa. According to what I can see in Lion's…
Ilya Laktyushin
  • 380
  • 1
  • 3
  • 8
4
votes
1 answer

Hot to create custom NSSlider like "Start screen saver:" slider in System Preferences

How to create custom NSSlider that is working exactly as slider in System Preferences -> Desktop & Screen Saver -> Screen Saver -> Start screen saver: ? I tried to subclass NSSliderCell with overridden continueTracking: but it don't work as…
andron
  • 307
  • 1
  • 11
4
votes
2 answers

Detecting an NSSlider value change

How do I wire up an action programmatically to my NSSlider to detect when the value changes? I'm looking for the Cocoa equivalent of a UISlider that would be done with the following code. [myUISlider addTarget:self action:@selector(valueChanged:)…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
1
2 3 4 5 6