Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug - Using function key in txtfield with format=!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Bug - Using function key in txtfield with format=!
Divers
Thread ID:
00854883
Message ID:
00854883
Vues:
68
We commonly use function keys (typically F2) in our apps to display a selection list lookup for field values (account numbers, job numbers etc). We do this by having the following code:

Form init:
* set function keys to default action
on key

Field When:
*nothing (used to be on key label F2 do something)

KeyPress:
* trap the function key and perform the lookup
if lastkey()=-1
do something
thisform.refresh()
endif

Valid:
* prevent loss of focus from this field
if lastkey()=-1
return
endif

If the txt field has a format string of "!" (transform input to upper case), and on key has been issued already (to set function keys to default values), the character chr(159) gets inserted into the txt field. Without the format=! it doesn't happen.

Our work-around is to go through every form and remove the ! from the format string, and put !!!... in InputMask instead - a real pain.

Any thoughts?

Cheers, Matt.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform