Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Control Source programmatically
Message
De
09/10/2002 14:45:34
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00709192
Message ID:
00709449
Vues:
18
Gerard-

>I am setting these controls form a Parameter file and on a button on the screen (in my Base Class) I run a few lines of code as follows:
>
>lcCol = Alltrim(laGrid[lnFor,1]) && Array holds the column
>lcVar = ALLTRIM(laGrid[lnFor,2]) && Array line holds variable
>lcComm = lcCol + '.ControlSource=' + 'lcVar'
>&lcComm
>
>
>Now if lcVar has a simple field in it, it works fine
>But I've tried to get the IIF command working without success..
>If I enclose it in quotes, I just get a string out.

That's different from what you originally described. Let's suppose the following:
lcVar  = 'IIF(THISFORM.OptionGroup1.VALUE = 1, "thisform.text1value" , "thisform.text2Value")'
lcComm = 'this.ControlSource=' + lcVar
&lcComm
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform