Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot ENTER or TAB out of a control
Message
De
20/08/1999 18:03:03
Dennis Schuette
Customized Business Services, Llc
Yuma, Arizona, États-Unis
 
 
À
19/08/1999 15:03:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00255461
Message ID:
00256094
Vues:
28
The problem was indeed in the Keypress event. I solved it by adding the NODEFAULT code in each appropriate case as shown below:
**class txtDate.Keypress()
LPARAMETERS nKeyCode, nShiftAltCtrl

do case
case nKeyCode=13 or nKeyCode=9 && Enter
This.Parent.spnDate.Enabled = .f. && disable the spinner so cursor goes to next enabled control
=dodefault()
case nKeyCode = 5 && Up Arrow, add day
This.Value = This.Value + 1
nodefault
case nKeyCode = 24 && Down Arrow, subtract day
This.Value = This.Value - 1
nodefault
case nKeyCode = 18 && Page Up, add month
This.value = gomonth( This.Value , 1 )
nodefault
case nKeyCode = 3 && Page Down, subtract month
This.value = gomonth( This.Value , -1 )
nodefault
endcase


Thanks for pointing me in the correct direction.

Denis


>>I am using VFP 5.0a.
>>I have a container class with a textbox and spinner. The class works exactly like I want on the form, except I cannot ENTER or TAB out of the control. I am able to click on any other control and it works fine.
>>Any ideas?
>>
>>Denis Schuette
>
>Are you sure you don't have some code in the KeyPress for that control?
Dennis Schuette
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform