Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set combobox item thru code?
Message
 
 
À
12/09/1999 12:48:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00263770
Message ID:
00263805
Vues:
29
Ken,

You can also set the ListIndex property if you know what row you want. What is the scope of your a_tmp array? It probably should be either a property of your cbo class or of the form.

>Thanks Jim.
>Specifically, a_tmp is a two-dimensional array containing codes and descriptions. It is the RowSource of my combobox. The button.click event code below works fine to display the description for 'COD1' in the combobox. However, when I then try to select by picking from the dropdown list, I get 'feature not available' error.
>Any ideas most welcome.
>
>KEN='COD1'
>if ascan(a_tmp,ken)<>0 then
> x=ascan(a_tmp,ken)
> y=asubscript(a_tmp,x,1) &&returns row
> thisform.pageframe1.page1.CBOX_tmp.value=a_tmp(y,1)
>endif
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform