Re: Replacing the view in NSTabView
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