Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box bound to an array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01281347
Message ID:
01281484
Vues:
13
>>>I would appreciate help on the following question.
>>>
>>>I have a combo box bound to an array (RowSourcetype = 5 - Array). The RowSource of this combo is set programmatically in the INIT method of the combo. Then, in the INIT method of the FORM, a value is assigned to this combo box. What happens that if the value assigned to the combo box is not in the array, the combo box value is empty. Is it possible to make the value, even if it is not in the array, to be set/stick?
>>>
>>>Thank you in advance for any help.
>>
>>Use ASCAN() to check if the value is in the array. If it isn't, add it programmatically.
>
>George,
>
>First, great to see you again on UT. Secondly, thank you for your suggestion.
>
>But my business logic would be "broken" if I add the value to the array. So, I prefer to allow the "odd" value to appear on the combobox but not to be in the drop-down list. The reason is that the program will "catch" the wrong ("odd") value in the combo box later but if the value is in the array (and drop-down list) use will think that the value is valid. I hope I am clear in my explanation.
>
>Again, thank you all for the helpful contributions.

Dmitry, thank you very much for the kind words.

About the only thing I can think of that might be of help might not work. IOW, I haven't tested this. Given that play around with the assigning the value to the .DisplayValue property and setting the index to 0. That might get you where you need to go.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform