Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus
Message
 
À
27/06/1998 08:33:43
Ed Hizon
Skswood Sdn. Bhd
Kuala Belait, Brunei
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00111903
Message ID:
00112417
Vues:
24
>I have tried this and setfocus to the other column, but to get back the focus to the addbutton it will do the same. So I still can't get back to the addbutton.

Okay, this is ugly, but here's a workaround to the unwanted extra event-firing (I'm not sure if it's bug or design, but it's still present behavior in vfp6 beta):

1) create a property at form level, like "qty_done"
2) set it .F. in your cmdadd button click
3) set it true in the When of the qty textbox
4) in each of gotfocus,valid, and lostfocus put no code
5) in qty textbox keypress, put

if nkeycode = 13 && 'enter pressed'
thisform.cmdadd.setfocus
endif

Something like this should work...you could do a validity check, etc., on return to cmdadd, based on qty_done...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform