Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Color Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00859231
Message ID:
00928825
Vues:
41
>Nick
>
>A further issue - sorry to keep firing questions at you
>
>I need to have the grid rows in 1 of 3 colours
>
>colour 1 if condition 1 is met
>colour 2 if condition 2 is met
>otherwise condition 3 (normal blak on white background)
>
>Do I need to use 2 gridhiglighters for this? I have tried this apprroach but the second condition seems to stop the first from happening
>
>Thanks
>
>Colin
Here is the method I use per Nick's suggestion:

In the GridHighlighter OnPostSetDynamicColor method I have
************** This line calls the function which returns the corresponding color
store "my_color(BldMstr.RevLend,this.parent.GrdHglt1.nRecno, this.parent.GrdHglt1.cHighForeColor)" ;
	to thisform.grdBldMstr.ColStatus.dynamicforecolor
and my_Color is a separate program (could be a form's method, obviously) with this code:
=========================
********************************************************************
*  Description.......: my_Color - sets dynamic color for the grid
*  Calling Samples...: my_color(BldMstr.RevLend,this.parent.GrdHglt1.nRecno, this.parent.GrdHglt1.cHighForeColor)
*  Parameter List....: tcValue, tnRecno, tcRecordHighLightColor
*  Created by........:  
*  Modified by.......: Nadya Nosonovsky 05/09/2001 11:41:58 AM
********************************************************************
lparameter tcValue, tnRecno, tcRecordHighLightColor
local lnColor
do case
case m.tcValue = "E" && Edited
	lnColor = rgb(255,0,0) && Red
case m.tcValue = "A" && Accepted
	lnColor = rgb(0,0,255) && Blue RGB(64,128,128) && Green
otherwise
	lnColor = rgb(255,255,255) && Black
endcase
return iif(m.tnRecno = recno(), eval(m.tcRecordHighLightColor), m.lnColor)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform