Page 1 of 1

Is it possible to fix table cell's width ?

Posted: Thu Jan 20, 2011 10:34 pm
by jhonalone
I need fix width for some cells into a table, how can I do?

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;
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.

Posted: Fri Jan 21, 2011 10:45 am
by Sergey Tkachenko
What version of TRichView do you use?

Posted: Fri Jan 21, 2011 3:37 pm
by jhonalone
I`m using the 1.9.48 version. Sorry.

Posted: Fri Jan 21, 2011 7:19 pm
by Sergey Tkachenko
The problem in table sizing algorithm (too large width for merged table cells containing pictures or other wide objects) must be solved in newer version. I do not remember the version number where it was solved, sorry.

Posted: Fri Jan 21, 2011 7:22 pm
by Sergey Tkachenko
If you are the registered user, the most probably you can get the newest version for free (or at least version 11.1.1, it depends on the time where you registered).
Please send me details of your order in a private message (such as email address that might be in your order, or your full name), and I'll give you a link for free upgrading.

Posted: Fri Jan 21, 2011 7:25 pm
by Sergey Tkachenko
I found, this problem was fixed in version 12.4.5 (released in 2010-Aug-7)

Posted: Fri Jan 21, 2011 11:39 pm
by jhonalone
OK, Sergey. I'll send you a private message with register date and my full name.
Thanks.