SharpLeaf Reference > Table Methods > SetColumnWidths Method Table.SetColumnWidths Method
Set column widths to cycle through from current column on.
Overloads
Example
// Auto-fit first column, then share available width evenly amongst column 2-5
tb.SetColumnWidths(new int[] {0,-1,-1,-1,-1});
Description
Positive values are absolute size in points. Negative values are proportions. 0 is auto-fit to content. Default is -1. See SharpLeaf.IncludeTable for a decription of column width computation.
To prevent a column from displaying, pass 0 to SetColumnMaxWidths.
When using auto-fit, SetColumnMaxWidths to a fixed positive value might be useful to prevent columns from taking too much width.
When using proportions, SetColumnMinWidths to a fixed positive value might be useful to prevent columns from being sized to zero.
See also ...Sizing Columns and Rows | Table Cyclic Settings | Table Glossary | Table Members | Table.SetColumnMaxWidths Method | Table.SetColumnMinWidths Method
Send comments on this topic © Dyalog Ltd 2021
|