background image
C H A P T E R 7
Controls and Other Protos
7-6
Button and Box Protos
Keep in mind that if you set
scrollAmounts
to values other than the default,
your method must check the value passed to it and scroll that amount.
Note
In general, you should discourage double-tapping, since
inadvertently tapping twice can cause a double-tap action
to occur.
Advanced Usage
7
If you want more control over the arrow feedback, don't use the
scrollRect
,
viewRect
, or
dataRect
slots at all; instead, use the
SetArrow
and
GetArrow
methods.
For more information about the
SetArrow
method, see "SetArrow" (page 6-4) in
Newton Programmer's Reference; for more on the
GetArrow
method, see
"GetArrow" (page 6-4) in Newton Programmer's Reference.
Button and Box Protos
7
You use the protos described in this section to display text and picture buttons,
checkboxes, and radio buttons. The Newton System Software provides a variety of
button and box types for use in your applications.
Each of these protos uses specific methods to control its behavior. For many of the
protos, the Newton System Software calls the
ButtonClickScript
when the
button is tapped. You can define or redefine this method to generate the actions that
you want associated with the button.
The Newton System Software calls certain methods for each of the protos described
here. For information about which methods you need to define for each proto, see
"Button and Box Protos" (page 6-6) in Newton Programmer's Reference.
For information about sizing and placement recommendations for your button and
box protos, see Newton 2.0 User Interface Guidelines.
The following are the button and box protos that you can use in your applications:
The
protoTextButton
creates a rounded text button with text centered
vertically and horizontally inside it. For more information about the slots and
methods for this button, see "protoTextButton" (page 6-7) in Newton Programmer's
Reference
. Figure 7-5 shows an example of a
protoTextButton
view.
Figure 7-5
A
protoTextButton
view
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна