how do i...

Bob Arning arning at charm.net
Thu Oct 14 12:50:45 UTC 1999


On Wed, 13 Oct 1999 22:56:02 -0500 "Jason McVay" <jmcvay at bigfoot.com> wrote:
>i'm wanting to create a sortable, multi-column list morph like the macOS
>finder has. i started out by using an AlignmentMorph and then plugging in
>PluggableListMorphs. i got it working, but when i move a scrollbar in one
>list, the other lists--of course--don't scroll accordingly. how do i make
>the other lists scroll when i scroll one of them. can anybody help me out on
>this?

Jason,

The approach I have used with some success here is to have a single PluggableListMorph, but the StringMorphs that represent each line in the list are beefed up a bit to draw themselves in a columnar fashion. A simple approach is that the list holds a collection of column widths (which can change) and each StringMorphPlus parses its contents (for a tab, comma or something) and spaces the chunks out according to the column sizes. A more flexible implementation would be to give the individual morphs references to their model and a set of selectors with which to obtain data column by column.

Cheers,
Bob





More information about the Squeak-dev mailing list