Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Robert Frank
Thu, 10 Sep 1992 07:09
how to scroll a view on demand?
Author: Robert Frank
Date: Thu, 10 Sep 1992 07:09
Date: Thu, 10 Sep 1992 07:09
27 lines
1727 bytes
1727 bytes
Something simple for the IB-gurus (I'm a beginner):
The setup: I have a scrollview with a view as it's docView. The View's rectagle
is larger than the visible area of the scrollviews docView - making the
vertical scroller visible and functional.
When displaying the window the scroller is at bottom of the bar and I see the
bottom of the view.
How do I tell the scrollview (per software) to scroll to the top of the view?
I've tried the -scrollRect:by: method for views but with no luck. I know how to
place and size the scroller itself but not how to actually scroll the view.
The examples I have looked at all use matrixes as docViews which allow easy
scrolling to any position.
Any help appreciated.
-Robert
--
Robert Frank tel. + (061) 321 99 67
Institut fuer Informatik fax + (061) 321 99 15
University of Basel, Switzerland
Mittlere Strasse 142 rfc822: frank@ifi.unibas.ch (NeXT mail accepted)
CH-4056 Basel X400: S=frank;OU=ifi;O=unibas;P=switch;A=arcom;C=ch
( if all fails try frank@urz.unibas.ch )
Re: how to scroll a view on demand?
Author: Ray Spalding
Date: Thu, 10 Sep 1992 21:30
Date: Thu, 10 Sep 1992 21:30
15 lines
965 bytes
965 bytes
In article <1992Sep10.070945.13964@urz.unibas.ch> frank@ifi.unibas.ch writes: >How do I tell the scrollview (per software) to scroll to the top of the view? id clipview; NXPoint pt; pt.x = pt.y = 0; // assumes flipped coordinates (0 at top) clipview = [[scrollview docView] superview]; [clipview rawScroll:&pt]; [scrollview reflectScroll:clipview]; -- Ray Spalding, Office of Information Technology Georgia Institute of Technology, Atlanta Georgia, 30332-0715 Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads