Skip to content
ConsoleMonster
Cmdlet

New-ConsoleColumnFormat

Module
ConsoleMonster
Inputs
None
Outputs
ConsoleMonster.Layout.ColumnFormat

Creates shared numeric or detail-column layout settings.

Syntax

New-ConsoleColumnFormat
[-Alignment <Left|Center|Right>]
[-AllowShrink]
[-MinWidth <Int32>]
[-ReserveDigits <Int32>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Pass the result to a widget's CountColumn, PercentColumn, ValueColumn or DetailColumn parameter. MinWidth is measured in cells; ReserveDigits reserves room for numbers before they grow. Widths remain stable during live updates unless -AllowShrink is specified.

Examples

Example 1

New-ConsoleProgress -WidgetId build -Label Build -CountColumn (New-ConsoleColumnFormat -ReserveDigits 4)

Reserve four digits for progress counts.

Parameters

-Alignment HorizontalAlignment optional
Alignment within the column; numbers default to Right.
Possible values: Left, Center, Right
-AllowShrink SwitchParameter optional
Allows the column to shrink when its current content becomes shorter.
-MinWidth Int32 optional
Minimum width in terminal cells.
-ReserveDigits Int32 optional
Numeric digits reserved from the first frame.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.