Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SETFOCUS used in KEYPRESS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00633785
Message ID:
00633793
Vues:
22
>I would like to move the focus to an TEXTBOX from a hotkey (F3) - So I trap the F3 in KEYPRESS of my FORM and do THISFORM.SKUFIELD.SETFOCUS() - which gives me a 'Cannot use THISFORM can only be used within a METHOD." error (isn't keypress a method ?1?).
>
>Any thoughts on how to do this easily?

KEYPRESS is an EVENT......I did the following in a text box (text1) keypress at the top of a form:

if nKeyCode=-2 && F3 key
thisform.text5.setfocus()
endif

It moved the focus, correctly to the text5 text box.......

Must be something else causing your problem...???....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform