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

DynaPDF.Table.SetTableWidth

Changes the width of the table.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.Table.SetTableWidth"; Table; Value; AdjustType; MinColWidth )   More

Parameters

Parameter Description Example
Table The identifier for the table. $Table
Value The new value for the table width. 500
AdjustType The adjustment type. Can be UniqueWidth, AdjLeft or AdjRight. "AdjLeft"
MinColWidth The optional minimum column width. 100

Result

Returns OK on succes.

Description

Changes the width of the table.
At least one column must be modified when the width will be changed. The parameter AdjustType specifies how the column widths should be modified. If the new width is larger, then the difference can be added to the left or right column, or all columns can get a unique width (TableWidth / NumColumns). The parameter MinColWidth is ignored in this case.
If the new width is smaller, then the difference must be subtracted from the columns. The parameter MinColWidth specifies in this case the minimum width of columns that must be adjusted. It is only used if AdjustType is not set to coaUniqueWidth. The column widths are adjusted starting from the left or right side as specified. If the width of the first column is not large enough to subtract the entire difference, then the minimum width is set to the column and the adjustment continues with the next column until the gap is zero.
If the new table width is smaller as MinColWidth * NumColumns then the widths of the remaining columns will be set to zero. Such cases should be avoided since the column widths must be adjusted again when the table is drawn.

See also

This function checks for a license.

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


DynaPDF.Table.SetRowHeight - DynaPDF.TestGlyphs