Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box - Valid clause query
Message
De
30/01/2007 11:34:42
 
 
À
30/01/2007 11:30:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01190470
Message ID:
01190507
Vues:
21
>>>I have a combobox - (set up as a drop down list). It presents certain values (months) which the user can choose from. Depending upon other values in the form some months are unlikely, but not impossible, choices and the user is prompted via the valid clause to confirm that they do indeed mean to select a particular month. (so it's more a This.Advisory clause rather than a This.Valid clause!)
>>>
>>>If a user selects the dropdown with the mouse the valid triggers as soon as the mouse is released and the user can elect to accept the value or return to the combo. However, if the user returns to the combo and then uses the keyboard button, the control loses focus without the valid being triggered again.
>>>
>>>Any ideas?
>>>
>>>Thanks
>>>Barry Sutton.
>>
>>Use Combo.Interactivechange event
>
>Hi Edward,
>Although this didn't work exactly as I wanted, it DID highlight one omission in my code: after the valid had run the control displays the "invalid" value, which for some reason the user can tab out of (this is also the case with Interactivechange)- and personaly I think this is a bug; I would have thought that the valid code should run against the control no matter how a user elects to leave it.
>
>I have now reset the value of the control to the value on initial entry so the user has to choose again, or accept the initial value without change. It's not water-tight, I can still get around it, but it's now a lot better.
>Thanks for the pointer.
>Barry.

Generally speaking, Interactivechange event is used to catch value changes before losing focus, and Lostfocus to do the same (with trigger) after losing focus. These two events basically exclude any necessity to use Valid.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform