• 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: Request for Guidance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for Guidance


  • Subject: Re: Request for Guidance
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 05 Sep 2002 11:12:02 -0400

on 02-09-05 7:45 AM, Terry_Smyth at email@hidden wrote:

> My main question is what is the best way to implement this swapping of
> panes? I'm thinking of having a number of overlayed NSViews (custom view
> from IB pallette?), only one of which is visible at a time. Clicking a
> button hides the current NSView and shows the requested one (using
> removeFromSuperview and addSubview), with resizing of the main window if
> required. Does this sound like a valid approach? Presumably hiding an
> NSView also hides all its subviews? Does anyone know of any sample code
> which does this sort of thing?

NSTabView is just the ticket for you. It includes settings to hide the
borders and tabs so it doesn't look like a tab view, and to use a pop-up
menu or buttons to switch to different NSTabViewItem objects if you don't
want to use visible tabs. The documentation explicitly suggests you use this
API for the sort of interface you have in mind. It's very easy; you won't
have to manage the subviews yourself.

You should also look at NSToolbar.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Request for Guidance (From: Terry_Smyth <email@hidden>)

  • Prev by Date: Re: Request for Guidance
  • Next by Date: Re: PPP connection
  • Previous by thread: Re: Request for Guidance
  • Next by thread: Re: Request for Guidance
  • Index(es):
    • Date
    • Thread