views:

249

answers:

2

Hi,

I'm trying to add a collapsible panel to a panel I added in the Interface Builder, similar to the one found in Office 2008 and XCode itself.

This is the collapsible panel for those that don't know it:

OS X collapsible panel

Any idea how I can add this to my project? Google hasn't been of much help.

+5  A: 

This is most often referred to as a "disclosure view" or "disclosure panel" and usually has to come with an intelligent container view (that grows/shrinks/scrolls correctly with multiple disclosure subviews). There is no such control as part of the API. Most developers roll their own while some use third-party open source.

The Omni Frameworks have one such control that works very well (including "tear-off" panels, etc., if I recall correctly). The drawback: it's a large framework and has a lot of other stuff in it as well.

InspectorKit is another. It's more focused (just the control itself and an IB plugin), but the last incarnation I tested did have a few UI issues with the Interface Builder plugin.

Joshua Nozzi
I've used InspectorKit for a simple project. It's pretty straight-forward and easy-to-use, but it's pretty limited when it comes to customization (ie, if you don't like exactly how it is, tough). Fortunately, it's open source so you can fork it and muck around with it to your heart's content.
Dave DeLong
+3  A: 

I've also written a framework for handling this: SFBInspectors

sbooth