Hello riskmeter, Dmitry
In a phone book application made with MVD, I used this way to show different user groups
(green for family, red for health, blue for services and so on);
This is my code for that :
procedure Accueil_Grille_Contacts_OnChange (Sender: string);
var i,c,q : integer;
iRow,iCol : integer;
begin
c := Accueil.Grille_Contacts.RowCount - 1;
for i := 0 to c do
begin
If Accueil.Grille_Contacts.Cells[4,i] = 'Family' then Accueil.Grille_Contacts.Cell[4,i].Color := clGreen; // The 5th column
Accueil.Grille_Contacts.Cell[4,i].TextColor := clWhite;
If Accueil.Grille_Contacts.Cells[4,i] = 'Health' then Accueil.Grille_Contacts.Cell[4,i].Color := clRed;
Accueil.Grille_Contacts.Cell[4,i].TextColor := clWhite;
If Accueil.Grille_Contacts.Cells[4,i] = 'Various' then Accueil.Grille_Contacts.Cell[4,i].Color := clMaroon;
Accueil.Grille_Contacts.Cell[4,i].TextColor := clWhite;
If Accueil.Grille_Contacts.Cells[4,i] = 'Office' then Accueil.Grille_Contacts.Cell[4,i].Color := clOlive;
Accueil.Grille_Contacts.Cell[4,i].TextColor := clWhite;
If Accueil.Grille_Contacts.Cells[4,i] = 'Services' then Accueil.Grille_Contacts.Cell[4,i].Color := clBlue;
Accueil.Grille_Contacts.Cell[4,i].TextColor := clWhite;
end;
end;
Here, I give color for cells with same value and above all, I give a white color to value text so that it comes out better on color.
Does that answer your question ?
Thanks
JB