Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo RowSource not accepting Integers in EXE
Message
De
02/11/1998 23:09:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00153290
Message ID:
00153801
Vues:
25
David,

>>BoundTo must be .t. for a cbo to work the way you want. Look at the Help for the property.
Will check that out now.

Here what's I did yesterday :-

I've been experimenting with it.

Properties at design time :-
BoundTo=.F. (default)
BoundColumn=3 (the Integer field)
ControlSource=None
Style=DropDownList

The cbo is not bound, & RowSource=None (default) when Form loads. cbo.Init happens 1st, then Form.Init
Form.Init sets the RowSource (code below), here VFP gives Program Error - Syntax Error. Ignoring, proceeds ok, but the cbo is empty

lcProduct = ALLTRIM(lcProduct)
THISFORM.cboProductList.RowSource = lcProduct+'.Name,Contents,Product_ID'
THISFORM.cboProductList.VALUE = ALLTRIM(STR(&lcProduct..Product_ID))
THISFORM.cboProductList.REFRESH

If I move the code to cbo.Init, it's works (using another table), except I don't get the supposed alias, which is dynamically determined by the LPARAMETERS in Init. Does this mean RowSource can't be changed during RunTime? Why the difference with Run Form and EXE?
Tried setting it in cbo.Init, then setting it again in Form.Init - the error is produced in the latter. Integer-bound cbo's RowSource can't be set in Form.Init!

>Does it help to set the .Value to 0 on the property sheet?
Nop, Value=0 at design time won't work.

Also, the fault seem to lie with the Integer, removing the column rids the problem too.

Guess this is one of those VFP bugs
Kenneth.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform