General TRichView support forum. Please post your questions here
j&b
Posts: 184 Joined: Mon Sep 05, 2005 1:35 pm
Post
by j&b » Wed May 30, 2012 8:11 am
I want to set the text in a rvTable.cell red, but I don't find an issue like "rveTable.Cells[r,c].FONT .color":
if (s<>'') and ((pos('5',s)>0) or (pos('6',s)>0)) then rveTable.Cells[r,c].FONT.Color:= clRed else ...clblack;
Sergey Tkachenko
Site Admin
Posts: 17572 Joined: Sat Aug 27, 2005 10:28 am
Contact:
Post
by Sergey Tkachenko » Wed May 30, 2012 10:05 am
Text color is a property of text, not of cell.
So it is assigned just like text in any other place, by specifying the proper StyleNo for text items.
j&b
Posts: 184 Joined: Mon Sep 05, 2005 1:35 pm
Post
by j&b » Wed May 30, 2012 12:41 pm
Thank you,
in the meantime I solved my problem with
cd.color:= clRed; Memo.ApplyStyleConversion(rv_COLOR);
But I thought that you have an issue like .Cells[r,c].Color
Sergey Tkachenko
Site Admin
Posts: 17572 Joined: Sat Aug 27, 2005 10:28 am
Contact:
Post
by Sergey Tkachenko » Wed May 30, 2012 3:00 pm
Cells[r,c].Color is a cell background color. A cell background color is a cell property.
But a text color and a text background colors are text properties.