Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need help with Grid Keypress event
Message
De
25/09/1999 13:37:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/09/1999 13:18:31
Dennis Schuette
Customized Business Services, Llc
Yuma, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00268949
Message ID:
00268963
Vues:
25
>I am using VFP 5.0a
>
>The following code in the Text1 control of a grid works fine for deleting and recalling records, but the Up and Down arrows, PgUp and PgDn keys no longer work. What am I doing wrong?
>
>**grdCategory.Column1.Text1.Keypress()
>**toggle deleted status if user pressed SpaceBar or Enter
>LPARAMETERS nKeyCode, nShiftAltCtrl
>do case
>case nKeyCode = 32 or nKeyCode = 13
>if deleted()
>recall
>else
>delete
>endif
>skip
>if eof()
>go bottom
>endif
>otherwise
>=dodefault(nKeyCode, nShiftAltCtrl)
>endcase
>nodefault
>
>Thanks in advance,
>Denis Schuette
>McElhaney Cattle Co.


Change place of "nodefault". Put it after "endif" and you don't need otherwise. You actually don't need "do case" also. It could be just another if..endif block.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform