Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hacked Re: Allow users to use key w/o changing check boxes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Hacked Re: Allow users to use key w/o changing check boxes
Divers
Thread ID:
00187476
Message ID:
00187476
Vues:
63
Diana,

Using the Enter key to navigate fields violates the normal Windows standards, but if you must...

Try this KeyPress method in your lowest level Checkbox class:
LPARAMETERS nKeyCode, nShiftAltCtrl
 
if ( nKeyCode = 13 )
   keyboard "{tab}"
   nodefault
endif

The keyboard moves focus like it does on a normal checkbox, you may or may not want that behavior if the users are using enter to move through controls and you don't have a commandbutton that is set to Default.

Many of my users use the Enter key instead of the Tab key to move from field to field. Unfortunately, this results in check boxes inadvertantly getting their values changed when users don't mean to. Is there any way to disable the automatic check or uncheck when a user presses enter? Clicking or using the space bar is how I'd prefer the check boxes' values be changed. The work around, I imagine, must be using the keypress event and looking for an enter key, but in that case I won't know if the user made a change and wants to keep it...
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform