Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hacked Re: Allow users to use key w/o changing check boxes
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Hacked Re: Allow users to use key w/o changing check boxes
Miscellaneous
Thread ID:
00187476
Message ID:
00187476
Views:
65
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
Next
Reply
Map
View

Click here to load this message in the networking platform