I have the following table:-
I want the last column of the table to be widened up to the right margin of the page so that it looks like the following:-
However, using the following code, I cannot get the last column to widen:-
Code: Select all
table.BestWidth:=-100;
for nX := 0 to table.RowCount-1 do begin
if table.Cells[nX, table.ColCount-1]<>nil then begin
table.Cells[nX, table.ColCount-1].BestWidth := 0;
end;
end;
If I manually resize the table like the following, I will get the printout I want:-
How can I get the code to work?
Thanks.
Frederick