Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set combobox item thru code?
Message
 
 
To
12/09/1999 12:48:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00263770
Message ID:
00263805
Views:
30
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
Previous
Reply
Map
View

Click here to load this message in the networking platform