Apple Newton Utilities Betriebsanweisung Seite 264

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 942
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 263
CHAPTER 7
Controls and Other Protos
7-4 Scroller Protos
viewRect, and dataRect. Each of these slots is a bounds frame with the
following form:
{left: 0, top: 0, right: 10, bottom: 10}
You usually create these bounds frame slots with the utility function SetBounds,
which is described in “SetBounds” (page 2-34) in Newton Programmers Reference.
When you use these slots, the scroller protos highlight the scrolling arrows
automatically to indicate to the user that more data can be viewed by tapping on the
highlighted arrows.
Each of the bounds frame slots serves a specic purpose in the scroller, as shown in
Table 7-1. The next section provides several examples of setting the values of these
slots for different scrolling effects.
Scrolling Examples 7
This section presents several simple examples of setting the bounds frame slots in
your scroller to allow scrolling.
Scrolling Lines of Text 7
To scroll lines of text, you set the values of the three scroller bounds frames as
required for your application. For example, if you have 20 text items in a vertical
list and you want to show 6 of the items at a time, you need to set the slot values
as follows:
scrollRect: SetBounds(0, 0, 0, 20) // 20 possible lines
viewRect: SetBounds(0, 0, 0, 6) // show 6 at a time
dataRect: SetBounds(0, 0, 0, 20)
Table 7-1 Scroller bounds frame slots
Slot name Description
scrollRect
Species the scrollable area, which is the total area that the
user can see, or scroll over, with the scroller.
viewRect
Species the part of the scrollable area that the user can
see at any one time. This is usually smaller than the area
specied by
scrollRect.
dataRect
Species the portion of the scrollRect that contains
data. In simple cases, this is the same as
scrollRect.
Seitenansicht 263
1 2 ... 259 260 261 262 263 264 265 266 267 268 269 ... 941 942

Kommentare zu diesen Handbüchern

Keine Kommentare