Big Bucket Software you like to use
NSTexturedComboBoxCell
August 21st, 2011

Observe: TextEdit in OS X 10.7:

TextEdit Toolbar

The paragraph style, family and typeface controls are NSPopUpButtons. The font size control is an NSComboBox. All of the controls are mini and are (more or less) sitting on top of an NSToolbar. But, if you were to create an NSToolbar and stick a mini NSComboBox onto it using Xcode, you’d end up with one of these:

NSComboBox in Interface Builder

Please note: The lack of rounded corners. I didn’t bother to reproduce the NSPopUpButtons since, as far as I could tell, they render identically in TextEdit and Xcode.

To track down the discrepancy, I injected F-Script into TextEdit to figure out what custom NSComboBox TextEdit must be using.

Injecting F-Script into TextEdit

Turns out it wasn’t custom at all. So, it must’ve been configured differently. I eventually tracked down the difference in configuration to the NSComboBox’s cell class: NSTexturedComboBoxCell. Googling it turned up nothing. Presumably new to 10.7 and definitely private.

So if you want to use it, and don’t intend to sell your app on the App Store, you can make your NSComboBox’s look right by changing the class type in Interface Builder.

First, select the Combo Box’s Combo Box Cell from the object list:

Object browser

And secondly, replace the cell class using the Inspector:

Custom class

And you’re all set. The final result:

NSTexturedComboBoxCell