Games with Scrolling and Resizing [GOODIE] ResizingGrid

RossBoylan at stanfordalumni.org RossBoylan at stanfordalumni.org
Sat May 28 21:59:21 UTC 2005


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)
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ResizingGrid.cs.gz
Type: application/octet-stream
Size: 1237 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050528/54ae505b/ResizingGrid.cs.obj


More information about the Squeak-dev mailing list