from preamble:
"Change Set: ResizingGrid Date: 28 May 2005 Author: Ross Boylan
Make a TwoWayScrollPane in which the material inside the TransformMorph will still be resized to fit vertically into the outer window.
The goal was to do a TableLayout inside the transform so that no vertical scrolling was necessary.
The following code initializes a subclass of SystemWindow to contain the such a ScrollPane. myPane _ RBTwoWayScrollPane new. myPane layoutPolicy: RBScrollLayout new. myPane scroller layoutPolicy: TableLayout new; listDirection: #topToBottom; wrapDirection: #leftToRight; enableDragNDrop; vResizing: #spaceFill; color: Color transparent. self addMorph: myPane frame: (0 @ 0 corner: 1 @ 1) "!
Commentary on the previous work: That was a goodie because I don't anticipate we'd want to put it in the mainline image; it's mostly an exploration of layout, morphs, and scrollbars. I did need the functionality, however.
Discoveries: ScrollBar tracks values mostly in fractions between 0 and 1. ScrollPane's mostly use pixels.
I was having trouble getting this to work with scrollbars because the original RBScrollLayout code was layout: aMorph in: newBounds "Compute the layout for the given morph based on the new bounds" "transformmorph's didn't expect to do layout, so don't transform" aMorph scroller doLayoutIn: (aMorph scroller transform globalBoundsToLocal: newBounds). Every time I scrolled this repositioned the material inside the scrollpane, keeping the left hand edge always in view. (Well, not always, but I didn't look into why. Sometimes clicking on the arrows would work to move the image in the scrollpane).
RB = Ross Boylan, not Refactoring Browser, in the changeset.
This was in a 3.6 image; later images support two way scrolling with the basic ScrollPane rather than TwoWayScrollPane.
squeak-dev@lists.squeakfoundation.org