views:

103

answers:

1

I have an NSSegmentedControl with the textured rounded style, and with the selection mode set to 'any'. The problem is that it is treating it like select none. When I switch the style to capsule, it works correctly. I am using this in a toolbar, although I have tested this in a view (on two different computers) as well and it behaves the same way.

Thanks for the help

+3  A: 

(Changing my answer.)

I've just realized this is a function of the rounded textured style. As of 10.5 (when I believe this was introduced), selection on this style of segmented control is indicated by a template image "glowing," not by a "pressed in" appearance.

See this example image showing a 3-segment control in the configuration you're asking about, each with NSLockLockedTemplate as its image. The "selected" states are, left to right, true, false, true.

So, not a bug, but a feature. :-)

Joshua Nozzi
two questions:1. Is there any way to get it to select the 'normal' way? (without writing it from scratch)2. How can I get that highlight thing in an image view or draw it in a custom view? (or something like that)
Jared P
For your first question, there is no way without (heavily?) subclassing NSSegmentedCell. I don't understand your second question.
Joshua Nozzi
the second q is not totally related (so I accepted your answer), but I was also just wondering how I could use that style of highlight on a mask without putting it in a clickable button (I'd use it as a status indicator for whether or not a server is online) thanks
Jared P