NSTableView with Plus and Minus buttons

cocoa, interface-builder

Solution

The best way that i found is to use NSSegmentedControl.

after you dragged it on the canvas, you should configure its style:

Style: Small Square
Mode:  Select Momentary

looks better. Now use "image" field to set NSAddTemplate and NSRemoveTemplate. Make sure that label field is empty.

Ok, we have "+", "-" and one empty segment. To prevent the latest one to be selected by the user, select it from Segment: pop up and turn off Enabled check box (located next to State: label).

And lastly, what we have to do is set width of first two segments to make them square.

- Go to Size inspector

- Select Segment 0

- Turn off "Fixed" checkbox (segment should immediately autoresize to fit image)

- Select Segment 1 and repeat number 3

- Now as you resize control, only last segment will change width

- Put it at the bottom of your table view and resize as well.

Enjoy ;)

Problem

How can I do something like that? I didn't find any appropriate object in the Interface Builder library. Any thoughts?

Original source

Related problems