is an option for the low-level function GridBox which specifies the widths to use for columns.
ColumnWidths
is an option for the low-level function GridBox which specifies the widths to use for columns.
Details
- The following settings can be given:
-
All wide enough to fit without breaking lines Automatic available width divided automatically among columns Scaled[s] fraction s of the available width n n ems in the current font {w1,w2,…} width specification wi for column i - With ColumnWidths->{w1,w2,…,wn}, the specification wn is effectively taken to be repeated if there are more than n columns.
- With ColumnWidths->Automatic, a particular column will never use more width than its widest element.
- An explicit setting for ColumnWidths overrides ColumnsEqual->True.
Examples
Basic Examples (3)
Set column widths in units of em-widths:
GridBox[{{"aaaaaaa", "bbbbbbb", "ccccccc"}, {"AAAAAAA", "BBBBBBB", "CCCCCCCC"}}, ColumnWidths -> {8, 15, 12}, ColumnLines -> True, GridFrame -> True]//DisplayFormSet column widths as fractions of total width:
GridBox[{{"aaaaaaa", "bbbbbbb", "ccccccc"}, {"AAAAAAA", "BBBBBBB", "CCCCCCCC"}}, ColumnWidths -> {Scaled[.4], Scaled[.1], Scaled[.3]}, ColumnLines -> True, GridFrame -> True]//DisplayFormSet all columns to the same width:
GridBox[{{"aaaaaaa", "bbbbbbb", "ccccccc"}, {"AAAAAAA", "BBBBBBB", "CCCCCCCC"}}, ColumnWidths -> {10}, ColumnLines -> True, GridFrame -> True]//DisplayFormSee Also
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1996), ColumnWidths, Wolfram Language function, https://reference.wolfram.com/language/ref/ColumnWidths.html (updated 2007).
CMS
Wolfram Language. 1996. "ColumnWidths." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/ColumnWidths.html.
APA
Wolfram Language. (1996). ColumnWidths. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColumnWidths.html
BibTeX
@misc{reference.wolfram_2026_columnwidths, author="Wolfram Research", title="{ColumnWidths}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ColumnWidths.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_columnwidths, organization={Wolfram Research}, title={ColumnWidths}, year={2007}, url={https://reference.wolfram.com/language/ref/ColumnWidths.html}, note=[Accessed: 13-June-2026]}