home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / programm / 8307 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  1.8 KB

  1. Path: sparky!uunet!gatech!asuvax!ncar!noao!arizona!kline
  2. From: kline@cs.arizona.edu (Nick Kline)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Query about Scroll Views
  5. Message-ID: <30507@optima.cs.arizona.edu>
  6. Date: 26 Jan 93 05:27:55 GMT
  7. References: <1jq025INN59s@uwm.edu>
  8. Sender: news@cs.arizona.edu
  9. Organization: U of Arizona CS Dept, Tucson
  10. Lines: 32
  11.  
  12.  
  13.  
  14. +    I am a little confused about the nature of the scroll view.
  15. +The confusion of course comes from ignorance about the behavior of the
  16. +scroll view.  Anyway, I am wondering just how a scroll view works.
  17. +For example, in digital librarian you type in a search and get a bunch
  18. +of icons below with the results.  Usually the list is more then a
  19. +screen full, so you have to use the scroller.  What I am wondering is
  20. +if DL actually has to recalculate and redraw the scroll view each time
  21. +it is scrolled.  Or, is there some tricky way to do it so that the
  22. +scroll view actually does the recalculated and what not.  I guess what
  23. +it comes down to is, if I want scrollable graphics, do I need to
  24. +overwrite the drawself with some code to calculate what should be
  25. +redrawn in the doc view of the scroll view?  I hope that I haven't
  26. +been to general in my question, but any input would be great.
  27. +Thanks in advance,
  28. +-- 
  29. +
  30.  
  31.  
  32. The way this usually works is you keep adding things to the scrollview.
  33. So your view inside the scrollview is bigger than the scrollview
  34. (ie you are showing only the first 15 lines of a 200 line scrollview)
  35.  
  36. When the user scrolls the window or scrollview or whatever, your view
  37. gets a message that says to redraw the part of the view that is now visible.
  38.  
  39. So you only need to remember how to redraw that part of the view.  Another
  40. solution is to draw your image somewhere else (another, offscreen view)
  41. and just copy from there back to the screen.
  42.  
  43. -nick
  44.