Article View: comp.sys.next.programmer
Article #1884A: Matrix on ScrollView
From: Zenon Fortuna
Date: Sun, 22 Nov 1992 14:24
Date: Sun, 22 Nov 1992 14:24
26 lines
1294 bytes
1294 bytes
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.
Technical Details
Message-ID:
<1992Nov22.142416.18928@resonex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!netcomsv!resonex!zenonReferences:
<1992Nov21.190811.13963@resonex.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!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