Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with grid cell color
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00366320
Message ID:
00366527
Vues:
15
Eric & Arne,
Copy and paste the following code into a PRG and run it. This demonstrates the effect I'm referring to:

create cursor crsSample (cDummy C(1), cColor C(5))
appe blan
repl cColor WITH 'Red'
appe blan
repl cColor WITH 'Green'
go top

oForm = create('ShowColor')
oForm.Show()

define class ShowColor as form
WindowType = 1

proc init
this.addobject("grdColor", "grid")
this.grdColor.RecordSource = "crsSample"
this.grdColor.Column1.ControlSource = "crsSample.cDummy"
this.grdColor.Column2.ControlSource = "crsSample.cColor"
this.grdColor.Column2.DynamicBackColor = ;
"IIF(crsSample.cColor = 'Red', RGB(255,0,0), RGB(0,255,0))"
this.grdColor.Column2.SelectOnEntry = .F.
this.grdColor.Visible = .T.
endproc
enddefine
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform