Last updated at 2:33 pm UTC on 9 January 2022
The AlignmentMorph is a subclass of RectangleMorph. It used to be the only Morph type with methods to control the layout of its submorphs (before 2000).
All morphs now support a layoutPolicy (undefined as default). The TableLayout is used to do what the AlignmentMorph does.
The AlignmentMorph as a submorph of Morph now relies on the layout implementations in the class Morph. You do not need to subclass AlignmentMorph in order to get layout behavior.
Thus that means that most of the job of AlignmentMorph is done by the class Morph it is kept around with a few configuration methods for compability and convenience reasons.
Examples of these methods are newRow and newColumn.
To get the alignment effect with a layout policy see:
Example - aMorph addMorph: anotherMorph (no layout and TableLayout) for the layout policy applied to a RectangleMorph.
More examples: How to lay out submorphs.
See AlignmentMorph changes in 2004