Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving trough form controls
Message
De
16/12/1997 11:39:38
 
 
À
16/12/1997 10:46:56
Stoyka Kurteva
Busoft Engineering Ltd.
Bourgas, Bulgarie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00066143
Message ID:
00066254
Vues:
30
>>>Hi all,
>>>
>>> I have a form with several controls. I'd like to move trough controls only by pressing Tab key, Ctrl+Tab or by mouse clicking.
>>> Would you please tell me how can I do this.
>>>
>>>Thanks
>>>
>>>Stoyka
>>Stokya,
>>
>>This is how things work without doing anything, what are you seeing that is different?
>
> I have a text box txtNameE on a form
> when txtNameE is the active control and txtNameE.value = "" I've pressed BackSpace key then the previous control got the focus.
>
>Stoyka

Set form.keypreview to .T.
in the form keypress event, watch for the keys you want to ignore: something like
do case
case nkeycode = 127 and this.activecontrol.value = space(0) &&backspace
nodefault
case nkeycode = 19 and this.activecontrol.value = space(0) &&leftarrow
nodefault
case nkeycode = 4 and this.activecontrol.value = space(0) &&rightarrow
nodefault
case inlist(nkeycode, 5,4) &&up and down arrows
nodefault
end case

This is an awkward solution, but yours is an awkward problem. Hope this gives you some ideas.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform