Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change Row Color in a Grid????
Message
De
18/09/1998 13:30:13
Greg Mourad
National Right To Work Committee
Springfield, Virginie, États-Unis
 
 
À
03/09/1998 06:56:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00132649
Message ID:
00138335
Vues:
12
Each column in a grid has properties called DynamicBackcolor and DynamicForeColor.

To change the color of the active row, do the following:

1) Add a property to the grid called CurrentRecord

2) In the AfterRowColChange method of the grid, add the following code:
this.CurrentReocrd=recno()
this.Refresh

3) In each column's DynamicBackColor property, put the following:
"iif(recno()=this.parent.CurrentRecord,RGB(0,0,200),RGB(255,255,255) )"

4) In each column's DynamicForeColor property, put the following:
"iif(recno()=this.parent.CurrentRecord,RGB(255,255,255),RGB(0,0,0) )"

Note that the properties in DynamicBackColor and DynamicForeColor must me in quotes, or you'll get an error.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform