Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor & Setall
Message
De
25/08/1998 16:57:38
 
 
À
25/08/1998 16:42:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00129862
Message ID:
00129866
Vues:
79
>Greetings All,
>
>I have an app that has a multipurpose grid based on user selections.
>In the refresh event of the grid I have the following code.
>
>if inlist(alltrim(upper(thisform.grid1.recordsource)),"WKSTTEMP", "WKDPTEMP")
>thisform.grid1.setall("DynamicBackColor", "iif(thisform.grid1.column1.text1.value = 9,RGB(0,0,255),RGB(255,255,255))","Column")
>
>thisform.grid1.setall("DynamicForeColor",
>"iif(thisform.grid1.column1.text1.value = 9,RGB(255,255,255),RGB(0,0,0))","Column")
>else
> thisform.grid1.setall("DynamicBackColor","RGB(255,255,255)","Column")
>thisform.grid1.setall("DynamicForeColor","RGB(0,0,0)","Column")
>endif
>
>In general, this code looks at the value in column 1 and if it is a 9 then it highlites the entire row. The code works great the first time the user selects this option. The problem occurs when the user selects the same option but with a different department. When the grid is being refreshed I get the following errors:
>
>Expression is invalid, use a valid expression for DynamicBackColor
>Expression is invalid, use a valid expression for DynamicForeColor
>
>I have also tried placing the code in another method I created, but I still get this error and it repeats for the number of records in the grid.
>
>Thanks in Advance.
>
>Scott


Remove the quotes around RGB(...) in your setall.

thisform.grid1.setall("DynamicBackColor",RGB(255,255,255),"Column")
thisform.grid1.setall("DynamicForeColor",RGB(0,0,0),"Column")
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform