Stefan
Thu Apr 05 12:19:56 CDT 2007
"Zoom" <keashdoc@hotmail.com> schrieb im Newsbeitrag
news:v_ydnVKtKa7lQonbnZ2dnUVZ_hisnZ2d@comcast.com...
> Hi,
>
> I am trying to create a Combobox control in VFP linked to a specific field in a
> table. The Rowsource for the Combobox is ARRAY with 10 predefined values.
> However, I want the user to be able to type in other values into the combobox if
> they need to enter values other than the 10 predefined values. If the table field
> contains a value other than the 10 predefined values, the combobox just shows
> blank. Maybe I am misunderstanding but isn't the purpose of the combobox to be
> able to use predefined as well as user defined values?
As Mark said, you can add new values to your combo.RowSource
at runtime dynamically, e.g. in pseudo code
If This.Value <> This.DisplayValue
Dimension yourArray[ALen(yourArray)+1]
Store (This.Value) To yourArray[ALen(yourArray)]
You'll probably find some complete code snippets via
http://groups.google.com/groups?as_q=combo+value+displayvalue&as_ugroup=*fox*
hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------