Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
AlignmentMorph changes in 2004
Last updated at 5:47 pm UTC on 30 August 2017
Moved to here from AlignmentMorph

The mechanism for arranging submorphs has changed in Squeak 3.x. Every Morph has now the capability to layout its submorphs (for details see class category 'Morphic-Layout' in the image), so you will generally not need to use AlignmentMorph anymore. (Although it isn't quite deprecated.)


In the Squeak 3.2 release (and probably older versions too), the class "AlignmentMorph" (which is obsolescent), is frequently used as an invisible spacer, and to hold collections of things such as a row of buttons.

Bob's SuperSwiki contains a project 'TableLayouts' which includes a good documentation how layouts are done. Classes TableLayout and ProportionalLayout are subclasses of the abstract class LayoutPolicy.

Andreas Raab pointed out earlier that AlignmentMorph can indeed still be used for the simple reason that it is a bit more explicit in intention, but it isn't necessary to use anymore though since any Morph can do what it can. (from the Squeak Mailing Lists, September 2002)


The original announcement of these changes is in http://groups.yahoo.com/group/squeak/message/21981

A useful discussion of converting to the new alignment can be found in the mail thread http://groups.yahoo.com/group/squeak/message/27785

Jan 2002 - Jeff Sparkes

Another useful discussion of when to use a parent morph to align submorphs: http://groups.yahoo.com/group/squeak/message/46601

And here is: How to lay out submorphs.