[comp.sys.mac.programmer] Horizontal scrolling in List Manager

gauthier@ntmtv.UUCP (Jay Gauthier) (08/22/90)

I'm using the List Manager to manage a single column of data.  Vertical
scrolling works great, scrolling one cell at a time with the arrows or
a page in the page down area.  Horizontal scrolling doesn't seem to
work the way I'd expect/hope.  If the list's view rectangle is smaller
than the cell width, I thought the List Manager would permit horizontal
scrolling to see the remainder of the cell.  Instead, it appears to
scroll one whole cell width, which ends up displaying blank space because
there is only one column.

Ideally, I'd like to set the "number of pixels to scroll" for this scroll
bar, but of course there is no such field defined.  The only way I can
think of to do this is to replace the scroll action procedure for the
horizontal scroll bar.  Is this the preferred way? the only way? something
I REALLY don't want to do?

Thanks for the help,
-- 

Jay Gauthier
BNR,   Mountain View  CA    (415) 940-2101
uucp:  ntmtv!gauthier@ames.arpa

siegel@endor.uucp (Rich Siegel) (08/24/90)

In article <1540@ntmtv.UUCP> gauthier@ntmtv.UUCP (Jay Gauthier) writes:
>
>Ideally, I'd like to set the "number of pixels to scroll" for this scroll
>bar, but of course there is no such field defined.  The only way I can
>think of to do this is to replace the scroll action procedure for the
>horizontal scroll bar.  Is this the preferred way? the only way? something
>I REALLY don't want to do?

	The way I did it (in the THINK Pascal Project Utilities, in case you
want to see how it looks) is to set up the list with *no* horizontal scrollbar,
and provide my own; the action for this scrollbar scrolls the list
horizontally, and my custom LDEF takes care of compensating for the offset
of the scrollbar.

	Fairly straightforward, but not a solution that leaps easily to mind.
:-)




~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group

minow@mountn.dec.com (Martin Minow) (08/24/90)

In article <1540@ntmtv.UUCP> gauthier@ntmtv.UUCP (Jay Gauthier) writes:
>
>I'm using the List Manager to manage a single column of data. ...
>Horizontal scrolling doesn't seem to
>work the way I'd expect/hope.  If the list's view rectangle is smaller
>than the cell width, ... it appears to
>scroll one whole cell width, which ends up displaying blank space because
>there is only one column.

Yup.  That's what it seems to do.  You'd have the same problem displaying
variable-height cells.

The code that actually draws list cells is called with the cell
row-column index to identify content and the drawing environment set
so the active position is at "that cell" as it is on the screen (clipped etc.)

I doubt that you could do what you want using the List Manager.
However, it shouldn't be too hard to get Think C's CCellGrid class (if
that's the right name) to do what you want.  Look in the "More Classes"
folder.  Unfortunately, it isn't documented but the source code is
fairly straight-forward.  For that matter, a CScrollPane
might also be a good place to start.

The list manager is only intended for fairly simple one- and two-dimensional
lists of things.  It doesn't handle variable-sized cells, nor has Apple
claimed that it should.

Martin Minow
minow@bolt.enet.dec.com