• 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: Replacing the view in NSTabView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing the view in NSTabView


  • Subject: Re: Replacing the view in NSTabView
  • From: Matt Neuburg <email@hidden>
  • Date: Sun, 25 Sep 2005 15:59:28 -0700
  • Thread-topic: Replacing the view in NSTabView

On Sun, 25 Sep 2005 16:38:32 +0200, Ivan C Myrvold <email@hidden> said:
>I want to replace the view that is displayed when the user clicks the
>tab number two with a custom NSView. How do I do that? I am unable to
>select the view in IB, to set the custom class for the view. And I am
>unable to connect to the NSTabViewItem to set the connection for an
>outlet.

You can surely connect to the NSTabView, right? So from there you can reach
the NSTabViewItem and from there you can reach its -view.

  NSTabViewItem* oldItem = [tabView tabViewItemAtIndex:1];
  NSView* oldView = [oldItem view];
  NSView* newView = [[MyView alloc] initWithFrame: [oldView frame]];
  [oldItem setView:newView];

Voila.

m.



--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: NSRectFIll() taking 0.03 seconds, too slow?
  • Next by Date: Re: CoreData Exception: Could not fulfill a fault
  • Previous by thread: Replacing the view in NSTabView
  • Next by thread: Re: Replacing the view in NSTabView
  • Index(es):
    • Date
    • Thread