Posted: Tue Feb 08, 2011 7:48 am
2) This procedure shows how to get all text with colored background:
Call:
Code: Select all
procedure EnumColoredText(RVData: TCustomRVData);
var i, r, c, StyleNo: Integer;
table: TRVTableItemInfo;
begin
for i := 0 to RVData.ItemCount-1 do begin
StyleNo := RVData.GetItemStyle(i);
if (StyleNo>=0) and
(RVData.GetRVStyle.TextStyles[StyleNo].BackColor<>clNone) then begin
// do something with RVData.GetItemText(i)
end
else if StyleNo=rvsTable then begin
table := TRVTableItemInfo(RVData.GetItem(i));
for r := 0 to table.RowCount-1 do
for c := 0 to table.ColCount-1 do
if table.Cells[r,c]<>nil then
EnumColoredText(table.Cells[r,c].GetRVData);
end;
end;
end;
Code: Select all
EnumColoredText(RichViewEdit.RVData);