Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LostFocus vs. Valid in Comboboxes
Message
De
14/09/1999 14:04:43
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00264458
Message ID:
00264599
Vues:
25
>>>>I have a Combobox on a toolbar that is used to look up a name and jump to that account. It will refresh the active form based on the account selected. I had code in the Valid of the Combobox which did the refresh, but somewhere down the road I would inevitably encounter a SetFocus and would get the "Can't call SetFocus from a Valid" error. So I moved the code to the LostFocus of the Combobox. Now it seems that if the user drops down and chooses a name from the list, the LostFocus is not fired unless the user presses Enter. I believe that the Valid DID fire when the user made a selection (with a mouse)from the list. So, how can I get the LostFocus to occur when the user chooses something from the dropdown? How can I detect when they choose something from the dropdown? (VFP 6.0 SP3)
>>>>
>>>>Thanks,
>>>>Elyse
>>>
>>>
Elyse,
>>>Combos are interesting that they're the only control in VFP where "when", "valid" event fires anytime you move between its items (Not just on entry and exit from combo). You may try InterActiveChange.
>>>Cetin
>>
>>Thanks. I thought about that, but this is a Combobox, not a list, so every time the user types a character the InteractiveChange would fire. I want to go through the LostFocus only when the user finishes typing a name or chooses one from the list.
>
>Can you call Lostfocus conditionally from Valid? (Not that I've ever tried it)

I'll still run into the SetFocus error that way.
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform