How I can a marked table-cell the cell-color alter
Posted: Sat Oct 13, 2007 11:28 am
How I can a marked table-cell the cell-color alter
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://writeally.com/forums/
Code: Select all
procedure TForm1.Color1Click(Sender: TObject);
var rve: TCustomRichViewEdit;
table: TRVTableItemInfo;
r,c,i: Integer;
begin
if not RichViewEdit1.CanChange or
not RichViewEdit1.GetCurrentItemEx(TRVTableItemInfo, rve,
TCustomRVItemInfo(table)) then
exit;
rve.BeginUndoGroup(rvutModifyItem);
rve.SetUndoGroupMode(True);
try
for r := 0 to table.RowCount-1 do
for c := 0 to table.ColCount-1 do
if (table.Cells[r,c]<>nil) and (table.IsCellSelected(r,c)) then
table.SetCellColor(clRed, r,c);
finally
rve.SetUndoGroupMode(False);
end;
rve.Change;
end;