Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
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
MBS(
"DynaPDF.Table.SetTableWidth"; /* Changes the width of the table. */
$Table; /* The identifier for the table. */
$Value; /* The new value for the table width.e.g. 500 */
$AdjustType; /* The adjustment type. Can be UniqueWidth, AdjLeft or AdjRight.e.g. "AdjLeft" */
$MinColWidth) /* The optional minimum column width.e.g. 100 */
Less
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
Created 18th August 2014, last changed 18th August 2014
DynaPDF.Table.SetRowHeight
-
DynaPDF.TextAnnot
Feedback: Report problem or ask question.