Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with setfocus used in keypress event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00029785
Message ID:
00029801
Vues:
26
>>If I use the keypress event to run code on nKeyCode = 13 the keystroke is performed in the next field entered. If the next object in the tab order is a command button, the click event is triggered. If I want to move the focus to a text box which is not next in the tab order using setfocus, on arriving in the desired field I get an unwanted "return" moving me into the next object in the tab order. I would be grateful for any help.
>
>Try putting the NODEFAULT command in the KeyPress(). This will keep the internal VFP event from firing. Just manually set your focus then.
>
>HTH,
>Tom

The same NODEFAULT command in the LostFocus event will prevent the focus from moving to the next object in the tab order. Instead, you can set the focus to any control.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform