ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/ScrollView-auto-update-resize

This is ScrollView-auto-update-resize in view mode; [Up]


Date: Sun 15-Aug-1989 15:42:45 From: Unknown Subject: ScrollView auto-update/resize 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
Date: Sun 15-Aug-1989 17:22:29 From: Unknown Subject: Re: ScrollView auto-update/resize 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 >From: UH2@PSUVM.BITNET (Lee Sailer)
Date: Sun 16-Aug-1989 06:21:00 From: Unknown Subject: Re: ScrollView auto-update/resize /* Written 12:22 pm Aug 15, 1989 by tsui@silver.bacs.indiana.edu in uxa.cso.uiuc.edu:comp.sys.next */ > 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. /* End of text from uxa.cso.uiuc.edu:comp.sys.next */ Check out Chapter 7 of the NeXT dox. It is in the fourth example. Sorry to say, it is not on the on-line dox. In a nutshell, you create an object that knows all about your nib. You then access the object instead of the nib. Basically, add in one level of indirection. Michael Rutman Softmed >From: jpd00964@uxa.cso.uiuc.edu

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.