Vinicius Bazanella
Vinicius Bazanella

Reputation: 505

Customize space between items in a NSToolbar

In my MacOS app I have a NSToolbar with some toolbar items (NSToolbarItem) inside. I've been trying to change the space between the items by subclassing both NSToolbar and NSToolbarItem, but without success. Is there a way to customize this space?

Upvotes: 0

Views: 427

Answers (1)

Vinicius Bazanella
Vinicius Bazanella

Reputation: 505

To solve this i ended up inserting all the views of each toolbar item into a stack, so I could control the space between them with the spacing property of NSStackView. Then my toolbar has only the stack as a ToolbarItem.

Upvotes: 0

Related Questions