Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enter Key as Tab
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00297403
Message ID:
00297672
Views:
26
>>>Why is it that on some of my forms, when I press ENTER while on a textbox, the focus goes to the next control in the tab order and on others it does not?
>>>
>>>TIA
>>
>>
>>Do you have a Command Button where the Default property = .T.?
>>
>>FYI, Enter is not supposed to advance to the next field. Enter is supposed to fire the Click method of the default command button.
>
>I found the problem. As it turns out I put a SetFocus to command button in the init of the form .I don't know why that created a problem but removing it solved it. What should the ENTER key do if there is no default command button? I'm in the process of rewriting an old legacy program. The users are use to using the ENTER key to advance to the next field. I'd like to mimic this behavior if possible. any suggestions?

I don't know the technical reasons that a SetFocus in the Init breaks somethings, but it could be because it breaks the normal event firing sequece for a form. LISAG - Load, Init, Show, Activate, GotFocus. I know I've had to put SetFocus in either the Activate or the GotFocus in order to not experience other "anomolies".
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform