Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus() Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00105861
Message ID:
00105892
Vues:
28
>>>I am calling SetFocus() of a textbox from a custom method of a form. My problem is the SetFocus() fires, but the object loses focus. It appears that a TAB is being processed after the SetFocus(). Anyone have any ideas?
>>
>>Do you mean that TAB fired implicitly? I guess, you could try NODEFAULT together with SetFocus().
>
>This problem actually exists as part of my error handler where I deal with field level validation rules. I give the user the RuleText from the DBC and then want to place the cursor back in the control that had the offense. However, I think the TAB that the user pressed to leave the textbox is being processed after I do my SetFocus()

If it's really so, you could catch TAB in KeyPress event, NODEFAULT it there and fire Setfocus() programmatically to launch Validation.
Maybe, you can just return .F. from valid?
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform