Layout Components (Solutions)

Exercise 2.1

Right after instantiating the boxes, add these two lines:

box1 layoutSpec offAxisEdgeWeight: #rowTop.
box3 layoutSpec offAxisEdgeWeight: #rowBottom.

box2 is centered by default.

ch50-alignmentTopDown

Figure C.1: Top to down

Exercise 2.2

Edit the example as follow:

...
spacer1 layoutSpec proportionalWidth: 1.
...
spacer2 layoutSpec proportionalWidth: 3.
...