Is it possible to fix table cell's width ?
Posted: Thu Jan 20, 2011 10:34 pm
I need fix width for some cells into a table, how can I do?
I insert a TJpegImage into a merged cell.
The padding of merged cell is enlarged inexplicablely.
The cell size is enlarged.
If, at running, I contract image, more and more, then the cell reduce size also to a point. If I continue contracting image, I find a point that cell do not reduce size.
Can I adjust the image size to cell size whitout change cell size?
Thank you for your time.
Code: Select all
table.BestWidth := -100;
table.MergeCells(0,0,NumCols div 2,7, True);
table.SetCellVisibleBorders(False, False, False, False, 0,0);
table.Rows[0][0].Clear;
try
pic := TjpegImage.Create;
pic.LoadFromFile('Logo.JPG');
table.Cells[0,0].AddPictureEx('', pic, 0, rvvaMiddle);
finally
end;
The padding of merged cell is enlarged inexplicablely.
The cell size is enlarged.
If, at running, I contract image, more and more, then the cell reduce size also to a point. If I continue contracting image, I find a point that cell do not reduce size.
Can I adjust the image size to cell size whitout change cell size?
Thank you for your time.