Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox with negative value ???
Message
De
04/06/1998 09:05:58
 
 
À
04/06/1998 02:49:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00103942
Message ID:
00104629
Vues:
26
>>>...
>>>>>
>>>>>this is a sample and doesn't works. If you select interativelly yes, but in init code dont.
>>>>
>>>>Sorry, it's bad sample. If you want to have two column and let say negative value in second column, then code should look like:
>>>>*** combo init event
>>>>this.addlistitem("a", 1, 1)
>>>>this.addlistitem("-1", 1, 2)
>>>>this.addlistitem("b", 2, 1)
>>>>this.addlistitem("2", 2, 2)
>>>>this.addlistitem("c", 3, 1)
>>>>this.addlistitem("-3", 3, 2)
>>>>
>>>>Now to 'initiate' the combo you can issue Combo.Value="-3" to get 'c' in text portion of the combo.
>>>
>>>Sorry. My mistake is in the sample. The original code is as you've describe. But still doesn't working. I can send you the class if no problem. It's very little size.
>>
>>It should work. Note, that you have to use Character value.
>>Sorry, but i can't accept your code. We have strict corporate policy for Internet downloads.
>
>¿Character value? I'll test it, but the combo is initialized to numeric value in design mode and i want to return a numeric value. Now, even the combo doesn't shows the initialized value, if the user selects an option it returns a numeric value. If i set the init value to character one, what will be the return value when the user selects an option ?. I know that i can use val() to convert string in numeric value, but it seems not pretty.

As long as you use AllListItem to populate the list, you have no choice except character values. To provide numeric values, you should change list.rowsource to alias/fields with Int value in second field.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform