Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Negative Grid Values in Red
Message
 
À
31/08/1998 09:03:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00131466
Message ID:
00131512
Vues:
13
>Jim,
>
>Thanks for the reply and we're on the right track. I'd like to narrow the "red cells" to include only those cells that are negative. Right now the code changes the forecolor of the entire row in all columns. Ideally those cells which are positive are black and negative cells are red.
>
>Thanks in Advance.
>
>Scott

Scott,

Try something like this in the Grid's Init;
FOR EACH Col IN THIS.Columns
   IF TYPE(Col.ControlSource) = "N"
      Col.DynamicForeColor = "IIF(THIS.Text1.Value < 0,RGB(255,0,0),RGB(0,0,0))"
   ENDIF
ENDFOR
The above code assumes you have left the cotrol in the column as the textbox. You can also directly set the DynamicForeColor property in the form designer.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform