I have tried so many combinations, ie adding cell heights, cell bestheights, table heights, table bestheight - no luck so far.
Is there any way to get the table width and height?
my code :
Code: Select all
tbl := TRVTableItemInfo.CreateEx(2, 2, rvFtr1.RVData);
//background image for a cell
p := TJpegImage.Create;
p.LoadFromFile('c:\temp\a.jpg');
tbl.Cells[0,0].BackgroundImage := p;
tbl.Cells[0,0].BackgroundStyle := rvbsStretched ;
tbl.Cells[0,0].BestHeight:= 100;
tbl.Cells[0,0].BestWidth := 100;
tbl.Cells[0,1].LoadRTFFromStream(footerInfo.Content);
rVFtr1.AddItem('footer table', tbl);
i := TBitmap.Create;
rvFtr1.Format;
[color=red]// I need to set the image dimensions here !!
// But how to get the table dimensions ???
i.Height:= tbl.Cells[0,0].Height + tbl.Cells[1,0].Height;
i.Width:= tbl.Cells[0,0].Width + tbl.Cells[0,1].Width ;[/color]
i.Canvas.Pen.Color := clBlack;
i.Canvas.RoundRect(2, 2, i.Width - 2, i.Height- 2 , 20, 20);
tbl.BackgroundImage := i;
tbl.BackgroundStyle:=rvbsCentered ;
ND