CHAPTER 8
Text and Ink Input and Display
8-12 Using Text
Once a lightweight paragraph view has been instantiated, you cannot dynamically
change the view flags to make it an editable view, or add multistyled text by
providing a
styles slot, since this type of view object doesn’t support these
features. If you need this functionality for an existing lightweight paragraph view,
you’ll have to copy the text out of it into an editable paragraph view.
Using Input Line Protos 8
Input line protos provide the user with single lines in which to enter data. There are
four input line protos available:
■ protoInputLine is a one-line input field that defines a simple paragraph
view in which the text input is left-justified.
■ protoRichInputLine is the text and ink equivalent of protoInputLine.
■ protoLabelInputLine is a one-line input field that includes a text label and
can optionally include a pop-up menu known as a picker.
■ protoRichLabelInputLine is the text and ink equivalent of
protoLabelInputLine.
protoInputLine 8
This proto defines a view that accepts any kind of text input and is left-justified.
Below is an example of a what a
protoInputLine looks like on the
Newton screen:
The
protoInputLine is based on a view of the clParagraphView class. It
has no child views.
The following is an example of a template using
protoInputLine:
myInput := {...
_proto: protoInputLine,
viewJustify: vjParentRightH+vjParentBottomV,
viewLineSpacing: 24,
viewBounds: SetBounds( -55, -33, -3, -3),
...}
The slots of the protoInputLine are described in “protoInputLine” (page 7-17)
in Newton Programmer’s Reference.
protoRichInputLine 8
This proto works exactly like protoInputLine. The only difference is that
protoRichInputLine allows mixed ink and text input, as determined by the
current user recognition preferences.
Comments to this Manuals