A group of subitems in a toolbar item.
- macOS 10.5+
- Mac Catalyst 13.0+
NSToolbar, the views and labels of the subitems are used, but the parent's attributes take precedence.
To configure an instance of
NSToolbar, you first create the individual toolbar items that will be the subitems:
and then put them in a grouped item:
In this configuration, you get two grouped items, and two labels. This differs from ordinary
NSToolbar objects because they are attached—the user drags them together as a single item rather than separately.
If you set a label on the parent item:
you get two grouped items with one shared label.
If instead you set a view on the parent item, you get two labels with one shared view: