background image
C H A P T E R 8
Text and Ink Input and Display
8-28
Using Text
If you want to open one of these keyboards programmatically, use code like the
following to send it the
Open
message:
Getroot().alphaKeyboard:Open()
The keystrokes entered by the user are sent to the current key receiver view.
There can be only one key receiver at a time, and only views of the classes
clParagraphView
and
clEditView
can be key receiver views. When a
keyboard is open, a caret is shown in the key receiver view at the location where
characters will be inserted.
The keyboard views are based on
clKeyboardView
, which is described in
"Keyboard View (clKeyboardView)" (page 7-35) in Newton Programmer's
Reference
.
Using Keyboard Protos
8
The keyboard protos to provide users of your applications with on-screen
keyboards with which to enter text. The following keyboard protos are available:
protoKeyboard
provides a standard keyboard view that floats above all
other views.
protoKeypad
allows you to define a customized floating keyboard.
protoKeyboardButton
includes a keyboard button in a view.
protoSmallKeyboardButton
includes a small keyboard button
in a view.
protoAlphaKeyboard
provides an alphanumeric keyboard that you can
include in a view.
protoNumericKeyboard
provides a numeric keyboard that you can include
in a view.
protoPhoneKeyboard
provides a phone keyboard that you can include in
a view.
protoDateKeyboardButton
provides a time and date keyboard that you can
include in a view.
protoKeyboard
8
This proto creates a keyboard view that floats above all other views. It is centered
within its parent view and appears in a location that won't obscure the
key-receiving view (normally, the view to which the keystrokes from the keyboard
are to be sent). The user can drag the keyboard view by its drag-dot to a different
location, if desired. Figure 8-10 shows an example of what a
protoKeyboard
looks like on the screen.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна