4

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 NSPanels?

Ivan Vučica
  • 9,529
  • 9
  • 60
  • 111

2 Answers2

3

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.

Rob Keniger
  • 45,830
  • 6
  • 101
  • 134
  • 1
    Shocking as it is, you're right. It's really odd that they don't provide a standard way to paint this segmented control. – Ivan Vučica Jan 08 '12 at 12:18
2

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.

alecail
  • 3,993
  • 4
  • 33
  • 52
  • This is the way I went about doing this half a year ago: a matrix with button cells that, upon click, changes the active tab in a tab view. I don't use alternate images, but I would if I needed that. Thanks! – Ivan Vučica Sep 17 '12 at 12:09