>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement