Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus is not working correctly
Message
 
To
13/05/1999 14:15:12
Steve Summers
Pima County Superior Court
Tucson, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00218523
Message ID:
00218550
Views:
23
Steve,

SetFocus is working fine. Check the sequence of events in your code;

If nKeyCode = 13 && Enter key
* Hit enter key
thisform.lstinfo.additem(this.value)
* Item added to list
this.value = ""
* value blanked out
this.setfocus()
* Focus set to this control
endif
* Keypress ends and VFP processes the Enter key
* Default for enter key is to move focus to the next control

As Bruce told you you need to stop the default processing of the enter key.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform