Page 1 of 1

Fixed cells

Posted: Tue Mar 04, 2008 11:04 am
by Nofate
Is it possible to make table cells of fixed size?

Posted: Tue Mar 04, 2008 4:05 pm
by Sergey Tkachenko
You can include rvtoIgnoreContentWidth and rvtoIgnoreContentHeight in table.Options. In this mode, width and heights of all cells are calculated basing on their BestWidth and BestHeight properties, sizes of cells contents are ignored.

Posted: Sun May 04, 2008 8:58 pm
by miyomo
Sergey Tkachenko wrote:You can include rvtoIgnoreContentWidth and rvtoIgnoreContentHeight in table.Options. In this mode, width and heights of all cells are calculated basing on their BestWidth and BestHeight properties, sizes of cells contents are ignored.
Hi, Sergey!
Can U post a little demo? Thanks for your help.

Posted: Mon May 05, 2008 5:09 pm
by Sergey Tkachenko

Code: Select all

table := TRVTableItemInfo.CreateEx(2, 2, RichViewEdit1.RVData);
table.Options := table.Options + [rvtoIgnoreContentWidth, rvtoIgnoreContentHeight];
for r := 0 to table.RowCount-1 do
  for c := 0 to table.ColCount-1 do begin
    table.Cells[r,c].BestWidth := 100;
    table.Cells[r,c].BestHeight := 100;
  end;
RichViewEdit1.InsertItem('', table);
Now try to insert something large in these table cells. Their widths and heights will not be changed.