Hi FengLange,
here is some reference from class library which defined Table method, just for your Ref.
public Table(int columns, int rows) : base(0, 0, 0, 0) {
Border = BOX;
BorderWidth = 1;
defaultLayout.Border = BOX;
// a table should have at least 1 column
if (columns <= 0) {
throw new BadElementException("A table should have at least 1 column.");
}
this.columns = columns;
// a certain number of rows are created
for (int i = 0; i < rows; i++) {
this.rows.Add(new Row(columns));
}
curPosition = new System.Drawing.Point(0, 0);
// the DEFAULT widths are calculated
widths = new float[columns];
float width = 100f / columns;
for (int i = 0; i < columns; i++) {
widths[i] = width;
}
Regards,
Robin