Tabs in iWork-style Inspector panel
Pregunta
how does one get the look of the tab buttons as they appear in iWork '09 Inspector NSPanel
?
Closest I could get is NSSegmentedControl
with "Small Square" style. Unfortunately, at least under Snow Leopard that results in grayed selection instead of blue selection.
Any ideas what Apple did to get the bluish aqua-style selection in various iWork '09 Inspector NSPanel
s?
Solución
The top icon bar is a Radio Group, which is actually a NSMatrix filled with NSButtonCells. You can check this using the application UIElementInspector.app, which is a sample code provided with XCode.
The selected cell displays its alternate image, other cells display their image.
Otros consejos
The iWork inspector tab buttons use images for their appearance. You can see the images if you Show Package Contents on one of the app packages and have a look in the Resources
folder.
To replicate this you could use an NSSegmentedControl
with a custom NSSegmentedCell
subclass that draws the images.