NSToolbaritemMBS.NSToolbarFlexibleSpaceItemIdentifier

I’m trying to get a new toolbar working using David Della Rocca’s example in MBS but I cannot get the flexible space to work - all items get bunched to the right hand side of the toolbar rather than spread across. As illustrated below.


Basically I’ve used David’s code almost direct, just changing icons and names.
Any ideas as I can’t see anything about toolbar item positioning?

It’s because your window is using the unified title bar, where the toolbar and title share the same space. In that scenario, the toolbar icons are always flush right instead of being spaced out.

2 Likes

Thank you.

Added w.toolbarStyle = NSWindowMBS.NSWindowToolbarStyleExpanded. Seems to fix it.

2 Likes