Avatar of luciliacoelho
luciliacoelho
Flag for Portugal asked on

how can i put a diferente colour in a grid line

how can I put different colors in the lines of a visual foxpro grid so as to highlight certain items.
thanks
Microsoft DevelopmentFoxPro

Avatar of undefined
Last Comment
Cyril Joudieh

8/22/2022 - Mon
Pavel Celba

You may use DynamicForeColor and DynamicBackColor of the Column. To highlite each the second line you may use following code:

THIS.setall("Dynamicbackcolor", "IIF(RECNO()%2=0,RGB(255,255,0),RGB(192,192,192))","Column")

in Grid.Init method code.
luciliacoelho

ASKER
thanks very much, for the topics. What i want is to change the color of the line numer p.e. 100.
ASKER CERTIFIED SOLUTION
Pavel Celba

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Cyril Joudieh

You can also use ICASE() instead of IF() for more choices
ICASE(logical1,color1,logical2,color2,...,colorn)

Or you can call a function that returns a color.
CategoryColor(query.category)
Your help has saved me hundreds of hours of internet surfing.
fblack61