Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot ENTER or TAB out of a control
Message
From
20/08/1999 18:03:03
Dennis Schuette
Customized Business Services, Llc
Yuma, Arizona, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00255461
Message ID:
00256094
Views:
27
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
Previous
Reply
Map
View

Click here to load this message in the networking platform