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:09:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00450099
Message ID:
00450112
Vues:
39
Use the setall command. Make sure you lock and unlock your screen when you do this. I believe the procedure has to be in code(prg) not in the form. It has been a while since I wrtoe this.

EXAMPLE
This.Grid1.RECORDSOURCE = 'COMBINED'
THIS.grid1.SETALL("DynamicForeColor",;
"gridcolor(rtrim(thisform.grid1.recordsource))",;
"column")
GO TOP
THIS.grid1.REFRESH

*~*~*~*~*~*~~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~*~*~*~*
PROCEDURE gridcolor
LPARAMETERS tsrecordsource
LOCAL lnbackcolor, lsfield, lsfieldvalue

lnbackcolor = 0
lnbackcolor = RGB(255,255,255) && Default to White

IF !EMPTY(tsrecordsource)
lsfield = tsrecordsource + ".Tableid"
lsfieldvalue = ALLTRIM(EVALUATE(lsfield))
IF lsfieldvalue = "1"
* tfip table - Dark Blue
lnbackcolor = RGB(37,30,130)
ELSE
* tranfile dark red
lnbackcolor = RGB(64,0,0)
ENDIF
ENDIF

RETURN lnbackcolor
ENDPROC
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform