C H A P T E R 6
Pickers, Pop-up Views, and Overviews
General-Purpose Pickers
6-7
The
protoTextList
picker is a scrollable list of items. The user can scroll the
list by dragging or scrolling with the optional scroll arrows and can choose one
or more items in the list by tapping them. The scrollable list can include shapes
or text. For information about the slots and methods for this picker, see
"protoTextList" (page 5-20) in Newton Programmer's Reference. Figure 6-6
shows an example of a
proto
TextList
.
Figure 6-6
A
protoTextList
example
The
protoTable
picker is a simple one-column table of text. The user can tap
any item in the list to select it. For information about the slots and methods for
this picker, see "protoTable" (page 5-24) in Newton Programmer's Reference.
Figure 6-7 shows an example of a
proto
TableList
picker.
Figure 6-7
A
protoTable
example
You define the format of the table using a
protoTableDef
object; see
"protoTableDef" (page 5-27) in Newton Programmer's Reference for
information. You define the format of each row using a
protoTableEntry
object; see "protoTableEntry" (page 5-29) in Newton Programmer's Reference
for information.
Using protoGeneralPopup
6
As with most protos, you create a
protoGeneralPopup
object by using the
NTK palette to draw one in your layout. After creating the object, you should
remove the
context
and
cancelled
slots. The
viewBounds
should be
(0,
0, width, height)
for the box. The
New
method tries to set the bounds
correctly, based on the recommended bounds passed to the call.