Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This.setfocus not setting focus
Message
 
À
19/01/2000 09:23:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00319809
Message ID:
00319855
Vues:
14
if you changed to

IF LASTKEY() = 13
...IF MDOWN()
......RETURN .T.
...ELSE
......THIS.Parent.Command1.Click()
......RETURN .F.
...ENDIF
ENDIF

it should probably work. In other words, if the user is clicking, you want the click to work.

Joe


>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?
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform