Re: NSCell and IB
Re: NSCell and IB
- Subject: Re: NSCell and IB
- From: "Erik M. Buck" <email@hidden>
- Date: Mon, 17 Sep 2001 18:11:33 -0500
For information about custom NSCell subclasses, see:
http://www.stepwise.com/Articles/Technical/NSCell.html
You do not have to use a NSMatrix and NSCells. You can put any view in a
scroll view. If you want, you can create a custom view containing other
views and put the custom view in a scroll view. That way you can draw
anything you want.
For example:
1) in IB create a box containing all of the controls that you want.
2) Create a custom subclass of NSView that has an outlet connected to the
box containing the controls.
3) Implement that custom view so that it copies the box any number of times,
adds the copies as subviews, and tiles them appropriately by setting their
frame origins. Make sure that the view adjusts its own frame and bounds to
make room for all the subviews.
4) In IB, group your custom view in a scroll view.
This is the heavy weight solution, but it is more general.
----- Original Message -----