Justification
leftRatio
, rightRatio
, topRatio
, and/or bottomRatio
. When you specify a top or bottom ratio, the corresponding top or bottom slot in viewBounds
is treated as a percentage of the height of the view to which it is justified (parent or sibling). Similarly, when you specify a left or right ratio, the corresponding left or right slot in viewBounds
is treated as a percentage of the width of the view to which it is justified.
It is easiest to use parentTop
/parentLeft
(or, rarely, siblingTop
/siblingLeft
) justification when using ratio justification. Other parent/sibling justification work in conjunction with ratio justification, but are less clear. If you look at the following examples--examining the settings in detail--you will see why parentTop/parentLeft
ratio justification is straightforward but all the other methods look strange. Indeed, some methods (such as parentBottom
justification) may look wrong at first glance.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996