C H A P T E R 5
Here is an example:
item.text := "IOU
" & target.(kDataSymbol).who
&& "owes me" &&
ViewDefs may be based on any of the generic view protos. You could use, for
, which has very little functionality. Or, if you wanted a picture
to display behind your data, you could base your viewDef on a
Routing and printing formats are also implemented as viewDefs. You can learn
more about using special protos to create routing and printing formats in Chapter 21,
Note that these are just a few examples of views you may use as a base view in
your viewDef. Your viewDef will function as expected, so long as the required slots
are set and the resulting view template is registered, either in the
slot of the
base view or through the
function of an auto part.
You may create the viewDef for the auto part that extends the Notes application by
as the base view. Create an NTK view template, named
, in which a
fills the entire drawing area. Then
save the view template file (using the Save As menu item) as
You can now set the slots as follows:
. This string appears in the Show button, if
there is one.
. At least one of the viewDefs associated with
a dataDef must have
as the value of its
. The three system-defined types for viewDefs are
. You may define others as you wish.
slot to 176 (of the four slot views that will be added
to this viewDef, each is 34 pixels high plus an 8-pixel separation between them
and an 8-pixel border at the bottom).
slot to 0, 0, 0, 0.
slot to horizontal parent full relative and vertical parent