home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!decwrl!netcomsv!resonex!zenon
- From: zenon@resonex.com (Zenon Fortuna)
- Subject: A: Matrix on ScrollView
- Message-ID: <1992Nov22.142416.18928@resonex.com>
- Organization: Resonex Inc., Sunnyvale CA
- References: <1992Nov21.190811.13963@resonex.com>
- Date: Sun, 22 Nov 1992 14:24:16 GMT
- Lines: 26
-
- In article <1992Nov21.190811.13963@resonex.com> zenon@resonex.com (Zenon Fortuna) writes:
- >I have a Matrix of ButtonCells displayed in a ScrollView.
- >To help with scrolling using the mouse, I have added the
- > [buttonMatrix setAutoscroll:YES] ;
- >message.
- >To have scrolling only through whole ButtonCells, I have added also
- > [scrollView setLineScroll:64] ;
- > // my ButtonCells are 64 units high
- >It works OK.
- >
- >Q: How can I find which cells of the Matrix are visible ?
- >
-
- Many thanks to Art Isbell and John Kheit for their suggestions.
- As Art writes:
- >
- > You must be using a ClipView to display only a portion of your Matrix, so you
- > might look at ClipView's getDocVisibleRect: to provide you with the coordinate
- s
- > of the visible Matrix rectangle. Then, of course, you'll have to do the math
- > (Button height and inter-Button separation) to determine what cells are
- > visible.
-
- It works. Thank you.
-
- -Z.
-