I would like to change the CellBorderColor of a table in my RichViewEdit.
This works. But ...
I save the RichViewEdit into a file (rtf-Format) and load this file again.
Now, I can change the CellBorderColor no more (but the CellBorderWidth can change I)!
Here my code:
Code: Select all
...
Table:=TRVTableItemInfo.CreateEx(r,c,RichViewEdit.RVData);
with Table do
begin
Color:=clNone;
CellBorderColor:=clBlack;
CellBorderStyle:=rvtbColor;
BorderWidth:=0;
BorderVSpacing:=0;
BorderHSpacing:=0;
CellBorderWidth:=1;
CellVSpacing :=-1;
CellHSpacing :=-1;
for r:=0 to RowCount-1 do
for c:=0 to ColCount-1 do
if Cells[r,c] <> nil then
begin
Cells[r,c].Clear;
Cells[r,c].AddNLATag('',RichViewEdit.CurTextStyleNo,RichViewEdit.CurParaStyleNo,0);
end;
end;
RichViewEdit.InsertItem('',Table);
...
RichViewEdit.SaveRTF('test.rtf',false);
...
Code: Select all
...
RichViewEdit.Clear;
RichViewEdit.LoadRTF('test.rtf');
RichViewEdit.Format;
...
RichViewEdit.GetCurrentItemEx(TRVTableItemInfo,rve,Item);
Tabelle:=TRVTableItemInfo(Item);
Tabelle.CellBorderColor:=clGreen;
Tabelle.CellBorderWidth:=5;
...
What I do incorrectly?
Crowbar