background image
C H A P T E R 8
Text and Ink Input and Display
Using Text
8-13
The slots of
protoRichInputLine
are described in "protoRichInputLine"
(page 7-19) in Newton Programmer's Reference.
protoLabelInputLine
8
This proto defines a view that features a label, accepts any kind of input, and is
left-justified. The
protoLabelInputLine
can optionally include a picker.
When the
protoLabelInputLine
does include a picker, the user selects a
choice from the picker. That choice is entered as the text in the input line, and is
marked with a check mark in the picker.
Figure 8-2 shows an example of a
protoLabelInputLine
with and without the
picker option:
Figure 8-2
An example of a
protoLabelInputLine
The
protoLabelInputLine
is based on a view of the
clParagraphView
class. It has two child views:
The
labelLine
child view uses the
protoStaticText
proto to create the
static text label and to activate the picker if the proto includes one.
The
entryLine
child view uses the
protoInputLine
proto to create the
input field into which the user writes text. The text value entered into this field is
stored in the
text
slot of this view.
You can have your label input line protos remember a list of recent items. To do
this, assign a symbol that incorporates your developer signature to the
'memory
slot of your prototype. The system automatically maintains the list of recent
items for your input line. To access the list, use the same symbol with the
AddMemoryItem
,
AddMemoryItemUnique
,
GetMemoryItems
, and
GetMemorySlot
functions, which are described in "Utility Functions" (page 26-1).
Picker option
indicated by
diamond
Example of a picker displayed after lable is tapped.
Check mark indicates the currently selected choice.
Simple
protLableInputLine
(no picker option)
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна