Path: utzoo!utgpu!watmath!iuvax!silver!tsui
From: tsui@silver.bacs.indiana.edu (Yufeng Tsui)
Newsgroups: comp.sys.next
Subject: Re: ScrollView auto-update/resize
Message-ID: <24636@iuvax.cs.indiana.edu>
Date: 15 Aug 89 17:22:29 GMT
References: <481@mit-amt.MEDIA.MIT.EDU>
Reply-To: tsui@silver.bacs.indiana.edu (Yufeng Tsui)
Organization: Indiana University, Bloomington
Lines: 41

In article <481@mit-amt.MEDIA.MIT.EDU> adam@mit-amt.MEDIA.MIT.EDU (Adam Glass) writes:
>I need to write some code to make a window and drop a scrollview into it, and
>make the scrollview auto resize as the user changes the size of the window.
>I can't use IB to make the window, so I can't do it all there. Does anyone
>have any ideas/help/CODE(!) to suggest/give? Thanks muchly...
>
>Adam
>
>--
>"Offer me anything I ask for..."      | email: adam@media-lab.media.mit.edu |
>"Anything you want."                  +---------------------------+---------+
>"I want my father back, you son of a bitch." - The Princess Bride | Sigh... |


Check the source code of little that comes with 0.9 What you have to
do is to create a window (myMaineWindow) and create a scrollView.  Then
you have to do:
    if (you need only the scrollView in the window)
       [myMainWindow setContentView:myScrollView];  
    else {
       [[myMainWindow contentView] setAutoresizeSubviews:YES];
       [[myMainWindow contentView] addSubview:myScrollView];
       [myScrollView setDisplayOnScroll:YES];
       [myScrollView setAutosizing:(NX_WIDTHSIZABLE 
 				    | NX_HEIGHTSIZABLE
                                    | ....depends on your need)];
    }
    
           
I have been doing this for the past a few weeks.  But recently I came
back to IB.  Here is another question concerning IB.  How do I use the
objects created in the IB?  I created a preference window for my application
and I want to get the switches and radiobuttons in this window and
connected them to an object defined in my application( IB knows
nothing about theis object), how do i do it?  Are the names listed in
the IB browser varible names I can use in my own object?  Any
suggestion welcome.  Thanks in advance.

--yufeng

tsui@silver.bacs.indiana.edu