Apple Newton Utilities Guide de l'utilisateur Page 233

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 232
CHAPTER 6
Pickers, Pop-up Views, and Overviews
Overview Protos 6-33
Changing the Font of protoListPicker 6
The mechanism described here will probably change in the future. Eventually you
may be able to set a
viewFont slot in the list picker itself, just as you can set
viewLineSpacing now. In the meantime, you need a piece of workaround code.
You must set the
viewFont of the list picker and also include this workaround
code.
Give the list picker the following
viewSetupDoneScript:
func()
begin
if listBase then
SetValue(listBase, 'viewFont, viewFont) ;
inherited:?viewSetupDoneScript();
end;
This sets the viewFont of the listbase view to the view font of the list picker.
You cannot rely on the
listbase view always being there (hence the test).
Using protoSoupOverview 6
For the most part, you use this proto like protoOverview, except that it is set up
to use a soup cursor, and, so, is easier to use. See “Using protoOverview” (page 6-24)
for information.
Determining Which protoSoupOverview Item Is Hit 6
There is a method of protoSoupOverview called HitItem that is called
whenever an item is tapped. The method is dened by the overview and you should
call the inherited method. Also note that
HitItem gets called regardless of where
in the line a tap occurs. If the tap occurs in the checkbox (that is, if
x is less than
selectIndent), you should do nothing other than calling the inherited functions,
because the inherited function will handle the tap, otherwise you should do
something appropriate.
The method is passed the index of the item that is hit. The index is relative to the
item displayed at the top of the displayed list. This item is always the current entry
of the cursor used by
protoSoupOverview, so you can nd the actual soup entry
by cloning the cursor and moving it.
func(itemIndex, x, y)
begin
// MUST call the inherited method for bookkeeping
inherited:HitItem(itemIndex, x, y);
Vue de la page 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 941 942

Commentaires sur ces manuels

Pas de commentaire