Re: Custom View usage in Interface Builder
Re: Custom View usage in Interface Builder
- Subject: Re: Custom View usage in Interface Builder
- From: j o a r <email@hidden>
- Date: Fri, 25 Jun 2004 13:59:54 -0700
On 2004-06-25, at 13.38, Alexander F. Hartner wrote:
>
1.) When I add components using Interface Builder to the view inside
>
the main window all the components are visible. But when I add
>
components to the view panel, accessed by double clicking on the view
>
instance, they do not appear in the final application. This also
>
raises several other questions :
I take it that you've added a "custom view" instance as a top level
object in your nib file, and that's what you're referring to as the
"view panel"?
>
1.1) What is the purpose of being able to double click on a view and
>
add components to the view in the view panel rather then on embedded
>
view inside the main window
The purpose is that you're not always interested in designing view
hierarchies rooted in a window. Perhaps you want to create pluggable
view hierarchies that you can drop in a window - for example for a
collaps / expand control.
>
2.) The size of the view is fixed by interface builder as it is
>
included in the parent view. Is it possible to use a view designed in
>
cocoa and simple add it via addSubView ?
The size of "the view"? Which view are you referring to here? A "view
designed in cocoa"? What type of view is that? Any view, be it a view
created in IB or programmatically, can be added to another view as a
subview when you're in the running application.
>
2.1) Will this respect the minimum size defined in Interface Builder
>
for the few.
Views don't have max / min sizes - windows does.
>
2.2) Will other views added in the same manor respect the size of the
>
view and position themselves next, below, above the added view.
>
Ideally I would like the behavior similar to Java's FlowLayout. Is
>
this possible or will have to do the placing myself ?
I'm not familiar with the "FlowLayout", but besides the functionality
in NSView to autoresize subviews, there is little or no support for
automatic control of the size and position of views. Autoresize of
subviews goes a long way to solve any problems you might have with
positioning an sizing of subviews though.
j o a r
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.