Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox value property and negative numbers
Message
 
À
28/06/1998 18:11:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00112343
Message ID:
00112359
Vues:
19
I can duplicate your results and IMHO, this is a bug in the combo-box behavior.
To get around the problem, I would create a custom method called SetValue() that would accept the value. If the value is negative, you can manually set the DisplayValue Property by using Ascan() to find the correct row in the array.

That said, you will need to handle the binding to a field manually. I have done this by adding a custom property called ManualControlSource. In 6.0, this is all very simple with the advent of Access/Assign Methods.




>Hi all!
>
>I am faced the followings:
>
>I often use the following scenario: there is a combo or listbox with
>rowsource: itemsarray
>rowsourcetype: 5
>columncount: 2
>boundto: .t.
>boundcolumn: 2
>columnwidths: xxx,0 (where xxx. the actual width of list)
>value: 0 (set the value numeric type)
>
>itemsarray is a two dimensional array with two column. The first column contains the names of items and the 2nd column contains the code values, (but these remain invisible)
>When user select an item the value property holds the code value, in numeric type.
>
>These technique works backward, too. Setting the value property, combo/list change the displayvalue.(And listindex property too) But...
>If the value is negativ, combo/list doesnot change its state, only the value.
>
>Has anyone any idea, how to overcome this problem?
>
>Any advise will be appreciated!
>TIA
>
>BB
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform