I want to add two touching items, such as a forward and back button, to NSToolbar
, like so:
NSToolbar
seems to add horizontal margins by default, for each item, like this:
I checked out the XIB source code under the toolbarItem
node, and there is no property/attribute that would provide a margin or padding.
Thanks for your help!
I do use NSSegmentedControl
for this which allows me to use my own images, labels, set custom actions, use a toggle, set a menu, etc. If this type of toolbar item works for you:
then you can see how I build these items in IB & code in this project (note that the AppDelegate class is the delegate
for the NSToolbar
):
If you really want the two items separated (but close together), set the style of the NSSegmentedControl
in IB from Rounded
to Separated
: