🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2341

Re: Query about Scroll Views

#2341
From: Nick Kline
Date: Tue, 26 Jan 1993 05:27
32 lines
1877 bytes

+	I am a little confused about the nature of the scroll view.
+The confusion of course comes from ignorance about the behavior of the
+scroll view.  Anyway, I am wondering just how a scroll view works.
+For example, in digital librarian you type in a search and get a bunch
+of icons below with the results.  Usually the list is more then a
+screen full, so you have to use the scroller.  What I am wondering is
+if DL actually has to recalculate and redraw the scroll view each time
+it is scrolled.  Or, is there some tricky way to do it so that the
+scroll view actually does the recalculated and what not.  I guess what
+it comes down to is, if I want scrollable graphics, do I need to
+overwrite the drawself with some code to calculate what should be
+redrawn in the doc view of the scroll view?  I hope that I haven't
+been to general in my question, but any input would be great.
+Thanks in advance,
+-- 
+


The way this usually works is you keep adding things to the scrollview.
So your view inside the scrollview is bigger than the scrollview
(ie you are showing only the first 15 lines of a 200 line scrollview)

When the user scrolls the window or scrollview or whatever, your view
gets a message that says to redraw the part of the view that is now visible.

So you only need to remember how to redraw that part of the view.  Another
solution is to draw your image somewhere else (another, offscreen view)
and just copy from there back to the screen.

-nick
Technical Details
Message-ID: <30507@optima.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!asuvax!ncar!noao!arizona!kline
References: <1jq025INN59s@uwm.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!asuvax!ncar!noao!arizona!kline
From: kline@cs.arizona.edu (Nick Kline)
Newsgroups: comp.sys.next.programmer
Subject: Re: Query about Scroll Views
Message-ID: <30507@optima.cs.arizona.edu>
Date: 26 Jan 93 05:27:55 GMT
References: <1jq025INN59s@uwm.edu>
Sender: news@cs.arizona.edu
Organization: U of Arizona CS Dept, Tucson
Lines: 32