Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Backcolor property of a grid's specific cell
Message
De
06/12/2000 16:11:15
 
 
À
06/12/2000 15:46:29
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00450099
Message ID:
00450113
Vues:
34
>I would like to programattically change the backcolor of certain cells in a grid depending upon each indivdual cells value.
>For example I would like to change every cell in the grid backcolor to red if the value is negative. Is there a way to do
>This ?
>
>Thanks for your help
>Stephen J. Hunt
>Admit Computer Services Inc.

Use the Column.DynamicBackColor property - e.g., in the grid.Init
Local loColumn
For Each loColumn In this.Columns
  If Type(loColumn.Controlsource)$"NIY"
    loColumn.DynamicBackColor = "IIf("+loColumn.ControlSource+"<0, RGB(255,0,0), RGB(255,255,255))"
  EndIf
EndFor
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform