Hello,
I'm iterating a table with his cells. In a cell I have different TCustomRVItemInfo classes. Now I have to extract from every cellitem, which is a TRVTextItemInfo, the RVData into a Stream.
Do you have a fast solution for me? Thanks in Advance!
Yours,
Michael
TRVTextItemInfo
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hello,
Sorry, my englisch isn't so good. Here my problem in another words:
I have a TRichViewEdit component, which contains a table with formatted text. Now I would like to extract, for each tablecell the formatted text into a RV-Stream.
Here a example:
Thanks in Advance.
Yours,
Michael
Sorry, my englisch isn't so good. Here my problem in another words:
I have a TRichViewEdit component, which contains a table with formatted text. Now I would like to extract, for each tablecell the formatted text into a RV-Stream.
Here a example:
Code: Select all
var
intIndex: Integer;
objData: TRVEditRVData;
objItem: TRVTableItemInfo;
objCell: TRVTableCellData;
intRow: Integer;
intCol: Integer;
intCount: Integer;
begin
objData := TRVEditRVData(rvEdit.RVData);
for intIndex := 0 to rvEdit.ItemCount-1 do
begin
if objData.GetItem(intIndex) is TRVTableItemInfo then
begin
objItem := TRVTableItemInfo(objData.GetItem(intIndex));
for intRow := 0 to objItem.RowCount -1 do
begin
for intCol := 0 to objItem.ColCount - 1 do
begin
objCell := objItem.Cells[intRow, intCol];
for intCount := 0 to objCell.ItemCount - 1 do
begin
if objCell.GetItem(intCount) IS TRVTextItemInfo then
begin
// => here save for each TRVTextItemInfo the RV-Text
end;
end;
end;
end;
end;
end;
end;
Yours,
Michael
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
var
intIndex: Integer;
objData: TRVEditRVData;
objItem: TRVTableItemInfo;
objCell: TRVTableCellData;
intRow: Integer;
intCol: Integer;
intCount: Integer;
begin
objData := TRVEditRVData(rvEdit.RVData);
for intIndex := 0 to rvEdit.ItemCount-1 do
begin
if objData.GetItem(intIndex) is TRVTableItemInfo then
begin
objItem := TRVTableItemInfo(objData.GetItem(intIndex));
for intRow := 0 to objItem.RowCount -1 do
begin
for intCol := 0 to objItem.ColCount - 1 do
begin
objCell := objItem.Cells[intRow, intCol];
[color=blue] if objCell=nil then
continue;[/color]
for intCount := 0 to objCell.[color=blue]GetRVData.[/color]ItemCount - 1 do
begin
if objCell.[color=blue]GetRVData.[/color]GetItem(intCount) IS TRVTextItemInfo then
begin
[color=blue]{ Use objCell.GetRVData.GetItemTextA(intCount) }[/color]
end;
end;
end;
end;
end;
end;
end;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: