Reputation: 1594
I'm wondering what the best way is to do a split NSToolbarItem
like Xcode does. I've read the documentation, but can't figure out a way to do this. Any ideas?
Upvotes: 0
Views: 46
Reputation: 1718
It's a custom control. Basically it's a custom NSView, drawing a background the same as a button/popup, draws the "selection" on both sides, handles mouse events and displays one of two menus based on which side was clicked. It's not difficult, but it's not a trivial amount of code to whip up and share either. Just look at any examples of making any kind of clickable custom view and you'll be on your way.
Upvotes: 1