Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box : Not showing values unless focus is set to it
Message
De
01/12/1998 17:27:10
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00145892
Message ID:
00163002
Vues:
42
>David -

From your explanation, I guess that's what my cbo.Value=List(1,2) does. But here's a stupid question. Why does DisplayValue choose to show the name (i.e. my first column), whereas value shows the integer (the second column), or is that just the way it is? Also, I guess I'm confused about why I need to bind to column 2 in the first place to get this to work. Is that because my controlsource is the integer value I'm storing or in other lingo, the aspect which makes it 'bound'?

Can you elaborate a little on your explanation of the connection between control source and the row source with respect to how the refresh affects it? Usually doing a refresh is a good thing, but evidently not in this case:)

Thanks,

Sylvia


Sylvia,
>
>Since you have bound the the cbo to column 2 and set BoundTo = .t. all you have to do is set cbo.Value = TheIntegerValue, the DisplayValue will show the name that the integer corresponds to.
>
>The Refresh() is probably wiping it out because the ControlSource doesn't have a n integer value that matches one of the integers in the second column.
>
>>Here are the settings for my combo:
>>
>>BoundColumn: 2
>>BoundTo: T
>>ControlSource: Cfenhance.en_category (type: integer)
>>RowSource: CfCatego.ca_name, ca_id
>>RowSourceType: 6 - Fields
>>
>> Why do you have to set the value to the (in my case integer) value you're storing for the control source in order to see the value I really want (namely the name:) in the combo box?? Secondly, why would a refresh of a page obliderate the value in the combobox?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform