🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by Zenon Fortuna Sat, 21 Nov 1992 19:08
Q: Matrix on ScrollView
#1881
Author: Zenon Fortuna
Date: Sat, 21 Nov 1992 19:08
19 lines
1011 bytes
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 ?

In other words I would like to know which is the first visible ButtonCell
and which is the last one.
I have tried to find the answer in the documentation, but slowly have the
feeling that I am asking too much ?    :-(

I will appreciate any hint and proof that I am wrong.

	-Z.
A: Matrix on ScrollView
#1884
Author: Zenon Fortuna
Date: Sun, 22 Nov 1992 14:24
26 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads