1

Wondering how to implement tabs in the same style as Espresso.app:

Espresso preferences window.

Is there a native class/view to use or is this done with a 3rd party solution?

Derek Reynolds
  • 3,237
  • 3
  • 23
  • 32
  • possible duplicate of [Highlight NSToolbarItems](http://stackoverflow.com/questions/566793/highlight-nstoolbaritems) – rob mayoff Dec 12 '11 at 00:13

2 Answers2

5

Unless you want to use a 3rd party solution like BWToolkit, you can simply use a standard NSToolbar, that sends selection notifications to one of your controller classes. You can then use an NSTabView to switch between the panels, and in your IBAction method (that receives selection notifications) you can determine which item is selected, and programmatically switch your NSTabView to the proper index.

Craig Otis
  • 27,979
  • 23
  • 117
  • 216
3

That's a standard NSToolbar with a delegate allowing selectable items. However, you're probably wanting the panel resizing behaviour that Espresso implements.

Take a look at Dave Batton's DBPrefsWindowController for a way to do this.

Rob Keniger
  • 45,217
  • 6
  • 98
  • 134