Re: Change window contents at runtime?
Re: Change window contents at runtime?
- Subject: Re: Change window contents at runtime?
- From: Greg Herlihy <email@hidden>
- Date: Wed, 31 May 2006 15:14:35 -0700
- Thread-topic: Change window contents at runtime?
The easiest way is to use Interface Builder to create a borderless,
"tabless" NSTabView in the window. Be sure to create as many tab views as
there are possible window contents. Next, create an NSObjectController with
the NSTabView as its content. Lastly, bind the menu indexes to the
selectedIndex property of the NSObjectController's selection. In that way
selecting a menu item will automatically change the window's visible
contents to the corresponding tab view item.
Greg
On 5/31/06 2:55 PM, "Alex Valys" <email@hidden> wrote:
> I'm sure this is a stupid question, but I've searched high and low
> and not found the answer.
>
> How can I change the contents of a window at runtime? Like what
> happens in the Network Preferences panel when you change the
> selection in the "Show" drop-down menu.
>
> Thanks,
> Alex Valys
>
> _______________________________________________
> 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
_______________________________________________
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