Toolbars
Toolbars in Cocoa are strips of controls that can be used as shortcuts. A toolbar can display its items as a text menu or as a graphical item. Items that don’t fit across the window are put into an overflow menu accessed by a right-pointing double arrow at the right edge of the toolbar. Toolbars are displayed in a strip across the top of the window, just under the title bar, and are managed by the window itself.
The NSToolbar class implements a toolbar, and the NSToolbarItem class implements the individual items in a toolbar. A toolbar item normally acts like a borderless button, sending an action message when it is clicked. This kind of item needs to be assigned an image, title, target, and action. Toolbar items can also be configured ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access