Search code examples
macoscocoanstoolbarnstoolbaritem

Unified NSToolBar/Titlebar with icons and labels?


Our designer wants a unified toolbar/titlebar (such as what Safari, XCode, et. al use) but wants labels under the icons. I have the display mode on my NSToolbar set to IconAndLabel but I still only get icons... if I do separate title and toolbars the labels show up.

I've found nothing in the docu or even via googling that suggests you're forced into icon-only view but that seems to be the case. What's the best way to get labels on these buttons? I want to avoid putting the labels in my image assets as that will complicate localization, so if that's the only choice I'd have to do it programmatically using a localized string.


Solution

  • As far as I know there is no way of having both the new unified toolbar and labels. Maybe you could put a bar under the toolbar that contains the labels, aligned perfectly to the images.

    But do you really need the labels? Apple is trying get rid of them with the new toolbar design. Try to make your icons as self-explanatory as possible. Don't forget that there are tool tips available as well for the button titles..