3

I'm making a Cocoa application, and I would like a panel like the 'Attributes Inspector' in Interface Builder. So with big tabs on the top and collapsable/expandable groups. Does anyone know how I can do this?

This is an image of the Attributes Inspector:

Attributes Inspector http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeQuickTour/Art/hello_win_attributes.jpg

So I actually want to make a window like the one shown in the image above.

sehe
  • 350,152
  • 45
  • 431
  • 590

3 Answers3

2

There's no built-in Cocoa controls to do this. You're going to have to write some custom views which replicate the functionality.

There some good advice for creating custom controls in the answers to this question: Looking for info on custom drawing of interface components (Cocoa)

If you need additional help, I recommend you ask smaller, more specific questions explaining what you've tried and what hasn't worked.

Community
  • 1
  • 1
kperryua
  • 10,424
  • 1
  • 37
  • 24
2

InspectorKit is FOSS on github.

Dave DeLong
  • 241,045
  • 58
  • 447
  • 497
1

I've written some custom classes to do this- it ended up being less work than I expected. I broke it down into two separate components which can be used independently- the first handles the icons at the top and performs the view switching and the second handles the expandable panes: ViewSelectorBar InspectorPanel

My code is available at github and is under the BSD 2-clause license.

sbooth
  • 16,303
  • 2
  • 52
  • 78
  • 2
    Have you considered a non-GPL license, such as MIT or BSD? GPL isn't a great fit for most Mac software, and since commercial software can't legally use GPL code and remain closed-source, GPL has the effect of limiting who might contribute back to your code, much less actually use it in the first place. – Quinn Taylor Aug 11 '09 at 17:19
  • 1
    When I roll this into a framework I will place it under the BSD license, yes. – sbooth Aug 11 '09 at 17:21