Justification
viewBounds
are relative to the parent's viewBounds
coordinates. You can justify a view horizontally in any of these ways:
parentRelativeLeft/parentRelativeRight
parentRelativeCenter
parentRelativeFull
parentRelativeTop/parentRelativeBottom
parentRelativeCenter
parentRelativeFull
It is important to understand that once you add a viewJustify
slot to a view template, its viewBounds
slot's values are interpreted relative to the view justification you specify. In fact, you can't even interpret the meaning of the viewBounds
until you know the justification of a view. In FIGURE 5.12, you can see a view, child, whose viewBounds
never changes even though its position does. What changes is the type of justification specified.
FIGURE 5.12 : Changing the justification of a child view.
viewBounds
remains the same (left: 0, right: 20, top: 0, bottom: 20
). What changes is which of the parent's bounds is used as the basis for defining 0,0
.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996