Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enter in Optiongroup
Message
De
03/09/1999 12:22:08
 
 
À
03/09/1999 10:47:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00261158
Message ID:
00261223
Vues:
23
>If i press Enter over an option in an optiongroup, the focus moves to the next option in the group, but if I click instead of pressing Enter, the focus remains on the selected option. There´s no problem so far, but if I give the focus to any object when the user selects an option then a problem appears:
>If the user clicks the option, the focus is given to the desired object, but if the user presses Enter the focus is given to the object and moved to the next one!!: the effect of the enter key is produced after the focus is given to the object.
>
>Is there any way to make enter behave as Click and not advance to the next object?
>I´ve tried clear typeahead, and even keyboard {shift+tab} with no success.
>
>TIA.

Hi Cristobal,

You could try putting something like the following in the keypress event of the option. The important bit is the NODEFAULT clause.

LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode = 13 and THIS.VALUE = 0
THIS.VALUE = 1
*-- put some code here to clear all other values
THIS.Click()
NODEFAULT
ENDIF

Mace
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform