Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Right way with combo box control?
Message
De
03/06/2008 10:38:22
 
 
À
03/06/2008 09:13:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01320984
Message ID:
01321303
Vues:
24
Hi Tamar,

When I left last night, I had code in .Click() that worked off of .ListItemID but after reading the chapter Marcia mentioned, I did some further testing and found out that .Click only fires when choosing with the mouse, not if the user chooses with an arrow key or using the first letter of the item to choose it (there is a good chart in her book "1001 Things..." on page 130 that outlines what fires under each scenario).

So I ditched trying to use a combination of the control source (upon form startup) and the ListItemID and instead just rewrote it to use .ListItemID.

ListItemID is not accurate until the form is entirely instantiated so to make sure it is up to date from the time the form shows, I called my .UpdatePlaintiffNames() method from the .Activate() of the form. It seems that by that point, any controls that have a value in them are now up to date as to their proper .ListItemID. I then put calls to the same method late in the validation code to keep things up to date (specifically, .ActionOnValid() in the VMP framework).

Thanks for your help...I think everything is good!
Albert

>Click is definitely not what you want; it's way too early. The one I tend to trip over is InteractiveChange, which is also too early, if you want to use the ControlSource.
>
>But Valid should work. By the time you get to Valid, the ControlSource should have been updated.
>
>Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform