beautypg.com

Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 95

background image

C H A P T E R 3

Views

About Views

3-11

leftValue

The distance from the left origin of the parent view to the left
edge of the view.

topValue

The distance from the top origin of the parent view to the top
edge of the view.

rightValue

The distance from the left origin of the parent view to the
right edge of the view.

bottomValue

The distance from the top origin of the parent view to the
bottom edge of the view.

Note

The values in the

viewBounds

frame are interpreted as

described here only if the view alignment is set to the default
values. Otherwise, the view alignment setting changes the way

viewBounds

values are used. For more information, see “View

Alignment” (page 3-13).

As shown in Figure 3-6, all coordinates are relative to a view’s parent, they are not
actual screen coordinates.

Figure 3-6

Bounds parameters

When you are using the Newton Toolkit (NTK) to lay out views for your applica-
tion, the

viewBounds

slot is set automatically when you drag out a view in the

layout window. If you are writing code in which you need to specify a

viewBounds

slot, you can use one of the global functions such as

SetBounds

or

RelBounds

,

which are described in “Finding the Bounds of Views” (page 3-39).

View

Parent View

Top

Bottom

Left

Right