Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip of the Day --- Focus Gotcha
Message
De
09/09/1999 08:50:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00262794
Message ID:
00262815
Vues:
20
There used to be an MS KB article using INLIST to trap the BaseClass type and if it was TextBox, ComboBox, etc. then do a REPLACE ControlSource WITH Value but I always thought that was awkward.


>>
>>Many of y'all know this one but many more might not. I had forgotten it and it bit me in the butt with a client:
>>
>>When calling a Save routine from a Toolbar button or Menu option, the changed data in the current control may not be saved. Why? Because the Control never really loses focus and, therefore, the underlying ControlSource is not updated with the new Value.
>>
>>The trick is to force a LostFocus. A good way to do that is to SetFocus() to an OK button or other non-databound control in the same Form.
>
>Exactly - I had to solve that one a while back. You can even have the control setfocus to itself, that's a little more generic way to do it...
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform