Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This.setfocus not setting focus
Message
From
19/01/2000 09:23:04
 
 
To
19/01/2000 09:02:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00319809
Message ID:
00319836
Views:
16
Hi Erik,
I appreciate the advice, both solicited, and unsolicited, but this code brought up a different problem. Focus cannot leave the textbox once it has been entered if I have this code in the valid. I couldn't even click the exit button, so I had to use my hotkey alt-x to exit.

>IF LASTKEY() = 13
>THIS.Parent.Command1.Click()
>RETURN .F.
>ENDIF


>Unsolicited advice:
>It's usually considered bad practice to put call code in events. Instead of >running the click method from the textbox, put the code that's in the click >method in a custom form method, and call it from both the textbox and button.

Are there specific problems that this can cause, or is it simply something they say not to do?
Paul A. Busbey
Victoria Insurance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform