Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


The function changes the width of a column.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.Table.SetColWidth"; Table; Col; Width; ExtTable )   More


Parameter Description Example
Table The identifier for the table. $Table
Col The column number. Range from 0 to DynaPDF.Table.GetNumCols-1. 0
Width The new width. 100
ExtTable Extend the table or adjust the other columns? 0


Returns OK or error.


The function changes the width of a column.
The width of a column can be changed in two different ways. If the parameter ExtTable is set to 1, then the difference of the current and new column width is added to the table width and the widths of all other columns is left unchanged.
If ExtTable is set to 0, the difference is subtracted from the next columns until the gap is zero. If the width of the column is larger as the table width then the table width is adjusted too. All other columns get a zero width in this case.
The column widths should be set from lower to higher indexes and no value should be set for the last column.
No column width should exceed the table width if ExtTable is set to false. Otherwise the widths of all other columns must be changed again. Change first the table width and then the column widths in such a case.


Sets the column width for first column to 200 point:

MBS("DynaPDF.Table.SetColWidth"; $table; 0; 200; 1)

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 18th August 2014

DynaPDF.Table.SetCellText - DynaPDF.Table.SetColor