Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box : Not showing values unless focus is set to it
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00145892
Message ID:
00166369
Vues:
27
Tom,

I think you were running into other problems and they were clouding the issue.

The only time that cbo.Requery() is needed is when something inside the RowSource has changed, then the drop list will not display the true items. Requery() tells the cbo to repopulate the dropdown list of items based on the current values found in the RowSource.

This really has nothing to do with Refresh() which tells the cbo to lookup the value of the ControlSource in the BoundColumn and adjust ListIndex accordingly.

>I tried it several ways and requery was the only one that worked. If the listbox has a lot of data (and it shouldn't) this method may be to much overhead. I'm assuming the listbox is just a picklist. You could also put an IF.. ENDIF to check if the bound column value changes and on requery if necessary.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform