开发者

NSSegmented Control Not Selecting

开发者 https://www.devze.com 2022-12-22 05:52 出处:网络
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 t开发者_Python百

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 t开发者_Python百科o 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


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.

There's an example 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消