Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!blake!mrc@Tomobiki-Cho.CAC.Washington.EDU From: mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) Newsgroups: comp.sys.next Subject: hint: scrolling text windows Message-ID: <942@blake.acs.washington.edu> Date: 22 Feb 89 21:56:40 GMT Sender: news@blake.acs.washington.edu Organization: Mendou Zaibatsu, Tomobiki-Cho, Butsumetsu-Shi Lines: 23 Suppose you want to have a scrolling text window in the application you're building. Well, IB makes that simple; you make a window, put a scrolling text view inside of it, and make that view fill the window. However, you'll discover that if you resize that window in your application the view doesn't resize. This is because the scrolling text view is a subview of the content view and size changes aren't passed to subviews by default. You can either write the code to pass down the resizing by hand, or you can make the scrolling text view be the content view. Suppose you have a socket from that scrolling text view (presumably because you want to note it down someplace). You might write the method for this socket as something like: - setmyText:anObject { /* make it be the window's content view, so resizing the window resizes the view */ [[anObject window] setContentView:anObject]; myText = [anObject docView]; /* note its docView for use later */ return self; /* standard return */ }