Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displayed value in a list box
Message
From
05/09/2006 13:05:07
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01150969
Message ID:
01151004
Views:
29
>Just a quickie. Brain gone numb today. I rarely have the source of a combo as a value list. Now I have one with just 3 values to choose from. I have the form defaulting to value 1 and I want that text to appear in the combo, but all I get is blank. I've set the combo's .value to List(1) but no joy.
>
>I've forgotten how to do this. :-S
>
>How do?
>
>'ppreciate it
>
>Terry
>
>Hmmm, since writing I've explicitly told it this in code, in .Init() and it's worked, but you'd think that its prop's would do so for you, wouldn't you.

A bug exists here. This should work:
BoundTo = .F.
Value = 1
but doesn't.

Workaround:
* If RowsourceType # 5
* set
Controlsource = 'this.FirstElement'
FirstElement  = 1 && 2 or 3
BoundTo = .F.
* read DisplayValue as Value
* in general
DEFINE CLASS myCombo AS Combo
  StartIndex = 1
  ControlSource = 'm.this.StartIndex'
  HIDDEN ControlSource
  HIDDEN BoundTo
ENEDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform