nssegmentedcontrol

How to center NSSegmentedControl

Hi, I've added an NSSegmentedControl to a pane on an horizontal split view on a normal window. I thought that adjusting the springs would make the segmented control centre itself automatically, but it doesn't. How can keep it centred? I was told to add an observer for when the parent view's frame changes, and manually adjust the positi...

NSSegmented Control Not Selecting

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 ...

NSSegmentedControl -selectedSegment always returns 0

I have an NSSegmentedControl with two segments set to "Select None" mode in Interface Builder. No matter what I try, I can't get -selectedSegment to return anything but 0, even though segment 0 is even disabled by default and can't possibly be selected. Here's the relevant function that gets called when you click any segment on the contr...

Using NSSegmentedControl with CoreData

I have a Core Data app that works to add or remove one of a Client's many Appointments with buttons bound in IB to my appointments ArrayController. The appointments content is derived from whichever Client is selected in a feed list. I wish to use a SegmentedControl, and as far as I could tell, this requires I programmatically add and r...

Programmatically defining NSSegmentedCell

I am a little stumped as to how to instruct a programmatically created NSSegmentedControl to use a subclass instance of an NSSegmentedCell. If I want to use a subclasses NSSegmentedCell on an NSSegmentedControl built using IB it would be as simple as doing the following: Drag an NSSegmentedControl into the NSView Click through to the ...