Re: How to create a subview NIB
Re: How to create a subview NIB
- Subject: Re: How to create a subview NIB
- From: mark <email@hidden>
- Date: Fri, 18 Feb 2005 08:40:01 -0800
Thanks! NSPanel was the key that I needed1
> From: Ricky Sharp <email@hidden>
>
> On Friday, February 18, 2005, at 09:51AM, Mark Dawson <email@hidden> wrote:
>
>> How do I create NIBs that are views destined to be programatically
>> added in to a view (via the addSubView call)? I don't want to have a
>> window as a superview. I see I can create "Application", "empty",
>> "Attention panel", "Inspector", and "IB Palette" from a "New?". I
>> could create an "empty" NIB, but I'm not sure what I first drag in to
>> create the view that contains that NIB's information (do I use the
>> "custom view"?)?
>
> Two methods come to mind.
>
> (1) If you have a subclass of NSView, create an "empty" nib, then drag over
> the .h file. In the nib window's classes tab, select the custom view class
> and choose Instantiate from the Classes menu. This will add a new icon to
> your nib's instances view. Select and set properties as appropriate.
>
> (2) Drag an NSPanel from the palette to your nib. Place your the contents of
> your view in the panel. In this case, when you want to add the contents of
> the panel to your window, just obtain the panel's contentView.
>
> --
> Rick Sharp
> Instant Interactive(tm)
>
_______________________________________________
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