home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7367 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.2 KB  |  37 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!decwrl!netcomsv!resonex!zenon
  3. From: zenon@resonex.com (Zenon Fortuna)
  4. Subject: A: Matrix on ScrollView
  5. Message-ID: <1992Nov22.142416.18928@resonex.com>
  6. Organization: Resonex Inc., Sunnyvale CA
  7. References: <1992Nov21.190811.13963@resonex.com>
  8. Date: Sun, 22 Nov 1992 14:24:16 GMT
  9. Lines: 26
  10.  
  11. In article <1992Nov21.190811.13963@resonex.com> zenon@resonex.com (Zenon Fortuna) writes:
  12. >I have a Matrix of ButtonCells displayed in a ScrollView.
  13. >To help with scrolling using the mouse, I have added the
  14. >    [buttonMatrix setAutoscroll:YES] ;
  15. >message.
  16. >To have scrolling only through whole ButtonCells, I have added also
  17. >    [scrollView setLineScroll:64] ;
  18. >                // my ButtonCells are 64 units high
  19. >It works OK.
  20. >
  21. >Q: How can I find which cells of the Matrix are visible ?
  22. >
  23.  
  24. Many thanks to Art Isbell and John Kheit for their suggestions.
  25. As Art writes:
  26. >
  27. > You must be using a ClipView to display only a portion of your Matrix, so you
  28. > might look at ClipView's getDocVisibleRect: to provide you with the coordinate
  29. s
  30. > of the visible Matrix rectangle.  Then, of course, you'll have to do the math
  31. > (Button height and inter-Button separation) to determine what cells are
  32. > visible.
  33.  
  34. It works. Thank you.
  35.  
  36.     -Z.
  37.