Skip to content
ConsoleMonster
Cmdlet

New-ConsoleTreeSelect

Module
ConsoleMonster
Inputs
None
Outputs
ConsoleMonster.Interactive.TreeSelect

Creates an embeddable, lazy object tree for Show-ConsoleApp.

Syntax

New-ConsoleTreeSelect
[-Depth <Int32>]
[-Disabled]
[-Height <Int32>]
-InputObject <PSObject>
[-Key] <String>
[[-Label] <String>]
[-MaxItems <Int32>]
[-MaxNodes <Int32>]
[-OnChange <ScriptBlock>]
[-RootPath <String>]
[-TabIndex <Int32>]
[-ValidationMessage <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Uses the same member adapters, paths, cycle guards and expansion budget as Show-ConsoleObject. Arrows expand and collapse; Enter drills into the selected subtree.

Examples

Example 1

New-ConsoleTreeSelect -Key Members -InputObject $config

Browse a configuration alongside other inputs.

Parameters

-Depth Int32 optional
Maximum expansion depth.
-Disabled SwitchParameter optional
Disables editing and removes the input from keyboard focus traversal.
-Height Int32 optional
Natural visible content rows.
-InputObject PSObject required
The object to browse.
-Key String requiredposition: 0
Unique key in the application's state and final hashtable.
-Label String optionalposition: 1
Visible label; defaults to the name using the core control's labels.
-MaxItems Int32 optional
Maximum items per collection.
-MaxNodes Int32 optional
Maximum nodes in the shared expansion budget.
-OnChange ScriptBlock optional
Runs once per committed edit on the owning input thread. Receives param($Value, $State) and injected $Value, $State and $Control. State is a hashtable; add or assign keys to write back. Output is discarded. Retains closure variables.
-RootPath String optional
Root expression displayed in selected paths.
-TabIndex Int32 optional
Keyboard focus order. Equal values preserve layout declaration order.
-ValidationMessage String optional
Initial validation text displayed below the input.

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.