Working with XE7 and WPTools 7.21
I am creating a table with 10 columns as follows
Code
tParTable := WPRtf1.ActiveText.CreateTable(par);
tRowStyle := tParTable.CreateRow(nil, true);
if tRowStyle <> nil then
begin
tRowStyle.ASet(WPAT_BorderFlags, WPBRD_DRAW_All4);
tRowStyle.ASetColor(WPAT_BGColor, $E0E0E0);
tCell := tRowStyle.InputCell;
tCell.ASet(WPAT_COLWIDTH, WPCentimeterToTwips(2.5));
tCell.SetText('');
tCell := tRowStyle.InputCell;
tCell.ASet(WPAT_COLWIDTH, WPCentimeterToTwips(1.5));
tCell.ASet(WPAT_Alignment, Integer(paralCenter));
tCell.SetText('125');
.../...
tCell := tRowStyle.InputCell;
tCell.ASet(WPAT_COLWIDTH, WPCentimeterToTwips(1.5));
tCell.ASet(WPAT_Alignment, Integer(paralCenter));
tCell.SetText('8000');
end;
tParTable.EndRow(tRowStyle);
Alles anzeigen
I see that the last column does not size to 1.5 centimeters as the others, but expands to the full available width of the page.
I do not know if there is some parameter for telling the global with of the table, and that it does not expand to the full width of the paper.