Skip to content
ConsoleMonster
Cmdlet

New-ConsoleLayoutGrid

Module
ConsoleMonster
Inputs
System.Object
Outputs
ConsoleMonster.Layout.IWidget

Lays console widgets out in an equal-width grid.

Syntax

New-ConsoleLayoutGrid
[-ColumnGap <Int32>]
[-Columns <Int32>]
[[-Content] <Object>]
[-MinColumnWidth <Int32>]
[-NoFillHeight]
[-RowGap <Int32>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Children fill the grid row by row. When columns would become narrower than 24 cells the grid uses fewer columns.

Examples

Example 1

New-ConsoleLayoutGrid -Columns 3 -Content { New-ConsoleChart -WidgetId a -Type Sparkline; New-ConsoleChart -WidgetId b -Type Sparkline; New-ConsoleChart -WidgetId c -Type Sparkline }

Three charts in a row

Parameters

-ColumnGap Int32 optional
Blank columns between cells.
-Columns Int32 optional
Number of columns (default 2).
-Content Object optionalposition: 0pipeline: True (ByValue)
Scriptblock that emits the cells.
-MinColumnWidth Int32 optional
Minimum column width before reducing the column count.
-NoFillHeight SwitchParameter optional
Fits rows to content instead of the default-on height fill.
-RowGap Int32 optional
Blank rows between grid rows.

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.