Re: How to create a subview NIB
Re: How to create a subview NIB
- Subject: Re: How to create a subview NIB
- From: daniel <email@hidden>
- Date: Fri, 18 Feb 2005 09:58:23 -0800
Does. Not. Compute.
You said you didn't want to have a window as a superview, but an
NSPanel is a window!
If you still don't want the wasted NSPanel instance, then yes, you just
drag a "Custom View" to the top-level window for your nib file. While
editing the nib (and testing the interface), IB does the honors of
substituting a generic window container around your view so you can get
an idea of how it might look in its eventual home.
Daniel
On Feb 18, 2005, at 8:40 AM, mark wrote:
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:
sweater.com
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