Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetAll(
Message
 
À
28/07/2004 10:16:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00928699
Message ID:
00930021
Vues:
17
Hi Terry

here is some code I use
WITH thisform.grid
	cDynamicBackColor="IIF(v_statusmon.completed>{},14412250,IIF(v_statusmon.latewarn,8421631,IIF(v_statusmon.earlywarn,11458559,14412250)))"
	.SetAll("DynamicBackColor", cDynamicBackColor, "Column")
ENDWITH
I know I had some problems with this but cant remember exactly why. It is probably with the RGB().

Regards
Geoff Scott

>Can anyone tell me what's wrong with the following "SetAll( "Dynamic.."..." call?
>
>While setting the values - no problem. It's only on .refresh() of the grid, or when I click somewhere in the form that I get the error:
>
>"Expression is invalid.  Use a valid expression for Dynamic..."
>
>and I get it at least twice for each.
>
>Select CENZNFLD		
>If SEEK( lnCompID)
>    Scan While AP_ID 	= lnAPID ;
>         And   AP_FLD_ID 	= lnAPFldID
>      lcFieldName	= ALLTRIM( FIELD_NAME)
>      lnAPFactor	= AP_FACTOR
>      Select csrZVARXACT
>      Locate For ALLTRIM( FIELDNAME) = lcFieldName
>      If FOUND()
>	replace FIELDVAL With lnAPFactor In csrZVARXACT
>      Endif
>    Endscan
>    With Thisform.grdCenZoneFields
>      .SetAll( "DynamicBackColor", "IIF( AP_FACTOR > 0, RGB( 0, 0, 255), RGB( 255, 255, 255))", "Column")
>      .SetAll( "DynamicForeColor", "IIF( AP_FACTOR > 0, RGB( 255, 255, 255), RGB( 0, 0, 255))", "Column")
>    Endwith
>Endif
>
>As far as I can ascertain the syntax is exactly as in Help, i.e.
>
>frmMyForm.grdGrid1.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, ;
>RGB(255,255,255), RGB(0,255,0))", "Column")
>
>Thanks
>
>Terry
May all your weeds be wildflowers
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform