Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo .Value
Message
 
To
17/04/1998 04:56:32
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00092797
Message ID:
00093306
Views:
27
The answer is....

The .displayvalue property, which I stupidly overlooked, needs to be set after the combo is loaded with an array. If you set the .displayvalue in the properties window, it will be reset to "" when the list is added from the array.
That was easy, (tongue firmly planted in cheek).

Eric K.

>>I have a combobox and I want to set the .Value so the user will see a
>default value inside the box BEFORE they use it. I've set .Value in the
>form designer with a string and an expression. I've tried setting the
>.Value in Init of Thisform, This, etc. The box is not bound to a
>table.field because I need to add items to it that are not in the table.
>Like, Select All or SelectMulti, which are names I do not want placed in my
>userid field of the user table. We want these options "inside" the
>dropdown. Why won't this box display .Value when it is set. It does display
>the first value in a cursor if I use SQL to load it but if I try to add
>items by setting recordsourcetype to 0, it blows away the list and only
>shows the AddItems. If I use an array, the initial value is blank, like
>RecordSourceType 0. This is a problem when someone sez to me, "I want a
>selectable option when the form appears." and my reply is "That's easy
>enough." :)-- It seems silly to have to create a table just so my combobox
>will display an Initial value. Is there a way to set RecordSourceType 0 and
>have the box display the first item in the list "without" selecting anything?
>
>Sawadee,
>Try
> cboname.displayvalue='blah_blah_blah'
>
>
>Gene Berger
>The Corner Analyst
>13995 Graham Road
>Pataskala, Ohio 43062
>(614) 927-8994
>gberger@asacomp.com
Previous
Reply
Map
View

Click here to load this message in the networking platform