[comp.sys.next] NXSplitView

martin@icsl.ucla.edu (Kenneth Martin/) (04/04/91)

Could anyone point me to an example of how one can use Interface Builder to
put an NXSplitView in a window with two subclasses of ScrollViews.  I want
to use IB because I'd like to include a number of other controls in the
window and would prefer not to do them by hand.  I assume I need to load
a custom view and then change it to an NXSplitView and make sure it gets
alocated and initialized properly but I am unsure of how these steps are
done.  I also assume that after the NXSplitView is set up, I can then
alocate, initialize and add my subcalsses using AddView.  Do any of the
examples in /NextDeveloper/Examples deal with NXSplitView?

Also, what function does one use in Improv to do histograms.

For both of these questions my e-mail address is martin@icsl.ucla.edu.
Thanks.
-Ken Martin

scott@texnext.gac.edu (Scott Hess) (04/05/91)

In article <2315@lee.SEAS.UCLA.EDU> martin@icsl.ucla.edu (Kenneth Martin/) writes:
   Could anyone point me to an example of how one can use Interface Builder to
   put an NXSplitView in a window with two subclasses of ScrollViews.  I want
   to use IB because I'd like to include a number of other controls in the
   window and would prefer not to do them by hand.  I assume I need to load
   a custom view and then change it to an NXSplitView and make sure it gets
   alocated and initialized properly but I am unsure of how these steps are
   done.  I also assume that after the NXSplitView is set up, I can then
   alocate, initialize and add my subcalsses using AddView.  Do any of the
   examples in /NextDeveloper/Examples deal with NXSplitView?

Unfortunately, I don't think there's an easy way to do NXSplitViews
within IB.  I once started on a project to attempt to make a splitview
custom palette, but there are too many undocumented areas of IB
related to how Boxes and the like work (so you could drag stuff into
the NXSplitView).

The best way I could see doing it would be to subclass NXSplitView,
and put a custom View of that class in there.  Add two outlets,
one for each side of the view.  Then, create two Boxes without borders
or titles, with the resizing springs sproinged, and put all your
stuff in those.  Lastly, make those the outlets of the NXSplitView
subclass, and have it automagically set things up in the - set<OutletName>:
methods.

Later,
--
scott hess                      scott@gac.edu
Independent NeXT Developer	GAC Undergrad
<I still speak for nobody>
"Simply press Control-right-Shift while click-dragging the mouse . . ."
"I smoke the nose Lucifer . . . Banana, banana."