1

I have a custom NSSlider.

Because of lacking space I want to show the value of it only when the user hovers over the slider. Just like this one: http://dribbble.com/shots/754412-Range-Selection

I know how the hover part works, using NSTrackingArea. My question is, how would I correctly make a popover like this?

I've had this question for quite a while. I guess you would use the same technique for animating single small elements over the screen outside of a window.

IluTov
  • 6,807
  • 6
  • 41
  • 103
  • I expect it's similar to a tooltip--you create and position a new NSWindow that contains the content of your hovering indicator. – nielsbot Dec 20 '12 at 22:23

1 Answers1

3

Use an NSWindow. Make it borderless and non-opaque so you can define its shape through a background image. Convert coordinates so you can position the "popover" window relative to the slider. Make it a child of the window containing the slider so that weird stuff doesn't happen with the Window menu, Exposé/Mission Control, etc.

rickster
  • 124,678
  • 26
  • 272
  • 326