• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to build a "System Preference" Panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to build a "System Preference" Panel


  • Subject: Re: How to build a "System Preference" Panel
  • From: David P Henderson <email@hidden>
  • Date: Sun, 17 Jun 2001 08:56:33 -0400

On Sunday, June 17, 2001, at 05:07 , email@hidden wrote:

I need to build a preference panel for an application which contains about 20 subcategories. so i thougth a good idea is to implement something in the look and feel of the system preferences panel as the user is already familiar with this panel.

i've taken a closer look on the nib's used by apple to implement the system preferences panel. there is one main nib with the icon view's and two boxes and there are a number of nib's in the /System/Library/Preferences folder, which reflect the possible settings.

and here starts my problem: how is it done to load the separate nib's within (probably a view) of the main-nib and to resize the main-nib to the proper size. (like the system preferences panel implements it).

has anyone done this before? i think this is a elegant way to handle application preferences. if anyone can help me build this panel i will release the source code for it, so anyone who likes to can implement his application preferences on this basis.

The answers you seek are in the NSView class. Specifically the methods involving adding and removing views. You want to replace a subview in your panel with the view contents of the nib for the selected icon. One trick for doing this easily is to use borderless/titleless NSBoxes connected to outlets; then, you can just swap out the subviews of the boxes. Remember to retain the removed view(s) for reuse.

Dave
--
Chaos Assembly Werks
"A lie can run around the world before the truth can get its boots on."
- Israel Zangwill (not Edward R. Murrow)


References: 
 >How to build a "System Preference" Panel (From: "email@hidden" <email@hidden>)

  • Prev by Date: Trouble with makeKeyAndOrderFront
  • Next by Date: Detecting editing in NSTableView cells?
  • Previous by thread: How to build a "System Preference" Panel
  • Next by thread: Re: How to build a "System Preference" Panel
  • Index(es):
    • Date
    • Thread