Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box: using the cursor keys - behavior?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00281190
Message ID:
00284178
Vues:
24
Interesting... Why not parse out the first item in the list (since it's comma delimited you can use at() ) and set the combo to that value? You'll also need to check for an empty list and not set anything in that case.

Barbara

>Ah... now it begins to make sense.
>
>Now, here's the tricky part. As usual, it seems, I'm doing something with the combobox that is over and above the common usage.
>
>This particular box allows the user to pick the size of certain apparel items in a product list. The product list is contained in its own table 'Products'. Some products are not apparel, and therefore do not have sizes. Other apparel items have different size lists. Without creating a separate table containing sizes for each item, I figured out a way to achieve the desired result by storing the size list for each product in a field of the products table as a comma delimited list (S,M,L,X,2X,3X). For the combobox, I specified Value as the RowSource type, and in the combobox Init, I set This.RowSource = products.sizes. During operation, the combobox goes to the sizes field of the record and reads in the list of values, then displays them.
>
>It works fine, except for defaulting to the bottom of the list. And unfortunately, since the list values are variable (and in some cases nonexistent), it is impractical to specify the first value as you suggest.
>
>
>Any further thoughts?
>
>Thanks again,
>Neil
>
>>
>>>How can I initialize it to the top of the list?
>>
>>If you want to set the value of the record to the first value on the list, then use
>>
>>thisform.MyCombo.value = < value of first item in the list >
>>
>>Note that if your VALUE and DISPLAYVALUE are different you need to be sure you use VALUE. This is the default setting for a combo box (boundcolumn = 1).
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform