Adding a table in a table cell

General TRichView support forum. Please post your questions here
Post Reply
hcourcelles
Posts: 16
Joined: Wed Aug 26, 2009 7:58 pm

Adding a table in a table cell

Post by hcourcelles »

Hi,

I'm trying to insert a table in a table cell.

First table

table1 := TRVTableItemInfo.CreateEx(1,2, RichViewEdit1.RVData);
table1.BestWidth := 700;
table1.BorderWidth := 1;
table1.Cells[0,0].BestWidth := 350;
table1.Cells[0.0].Clear;
table1.Cells[0,1].BestWidth := 350;
table1.Cells[0.1].Clear;
RichViewEdit1.AddItem('', table1);

Second table that I want to insert in cell 0,0 of first table

table2 := TRVTableItemInfo.CreateEx(1,2, RichViewEdit1.RVData);
table2.BestWidth := 350;
table2.BorderWidth := 1;
table2.Cells[0,0].BestWidth := 150;
table2.Cells[0,0].Clear;
table2.Cells[0,0].AddNL('Something');
RichViewEdit1.AddItem('', table2);

How can I do this?

Thanks for your help!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

table1.Cells[0,0].AddItem('', table2)
Post Reply