Organization of This Document
See Also
NSToolbar and NSToolbarItem provide you with a standard way to display a toolbar for a titled window below its title bar. These classes also provide users with a standard way to customize toolbars and save those customizations.
This programming topic describes how to use toolbars. It contains the following articles:
“How Toolbars Work” gives basic information on toolbars.
“Toolbar Management Checklist” describes what happens when you create a toolbar.
“Adding and Removing Toolbar Items” describes managing toolbar items, and the role of the NSToolbar delegate.
“Setting a Toolbar Item’s Representation” describes the different ways a toolbar item can be represented and how to set them.
“Validating Toolbar Items” describes how to set whether a toolbar item is clickable or not.
“Setting a Toolbar Item’s Size” describes how to set a toolbar item’s minimum and maximum size.
“Selectable Toolbar Items” describes how to support selectable toolbar items.
“Subclassing NSToolbarItem” describes the methods to override when subclassing NSToolbarItem.
“Determining if a Toolbar has Overflow Items” describes how to determine if a toolbar has items in the overflow menu.
“Calculating a Toolbar’s Height” describes how to determine the height of the toolbar.
The following sample code is available through Apple Developer Connection:
iSpend shows how to add basic toolbar support to an application.
ToolbarSample implements an example toolbar including using custom views in a toolbar item.
Last updated: 2007-01-08