PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → changing color of a row in a table
changing color of a row in a table
Débuté par Christine, 12 jan. 2005 13:32 - 2 réponses
Posté le 12 janvier 2005 - 13:32
I want to change the color of all rows which total > 10 (value of a cell)
so If total >10 then color the row red..
I see i can do it with
Table[Table]..Color = iLightRed
But my question is :
Where do i put this code ? In the initialisation of table ?
Posté le 12 janvier 2005 - 16:02
In row display:
If myvalue > 10 then
Table[Table]..BrushColor=iLightRed
else
Table[Table]..BrushColor=iDefaultColor
end
Bert
I want to change the color of all rows which total > 10 (value of a cell)
so If total >10 then color the row red..
I see i can do it with
Table[Table]..Color = iLightRed
But my question is :
Where do i put this code ? In the initialisation of table ?
Posté le 13 janvier 2005 - 15:04
Found , or at least a work around
ResNumOfRowVis is int
resnumOfRowToShown is int
i is int
ResNumOfRowVis= TableCount(Table,toVisible) // zichtbaar in de tabel
resnumOfRowToShown =TableCount(Table,toShown)
FOR i = 1 TO resnumOfRowToShown
TableSelectPlus(Table,i)
IF i > ResNumOfRowVis THEN BREAK
Do_Coloring(i)
END
PROCEDURE Do_Coloring(I)
IF I > 0 THEN
IF Table.Status = 1103 THEN
Table[I]..BrushColor = iLightRed
ELSE
Table[I]..BrushColor = iLightGray
END
END