ConsoleGuiTools icon indicating copy to clipboard operation
ConsoleGuiTools copied to clipboard

-OutPutMode not honored

Open cadayton opened this issue 6 years ago • 6 comments
trafficstars

Name : ConsoleHost Version : 6.2.1

ModuleType Version Name PSEdition ExportedCommands


Script 0.1.1 Microsoft.PowerShell.GraphicalTools Core {Out-GridView, ogv}

Test was trying to select a single row for further processing.

cadayton avatar Aug 15 '19 04:08 cadayton

@cadayton I'm a bit confused by this issue, can you go into more detail?

TylerLeonhardt avatar Aug 16 '19 04:08 TylerLeonhardt

Sure. [-OutputMode {None | Single | Multiple}]

By default OutputMode is 'None' meaning selection of a row isn't possible.

With OutputMode of 'Single' selected, then any single row in the Out-GridView can be selected and the contents of that row are returned. 'Multiple' is similar but multiple rows can be selected rather than limiting the selection to a single row.

When there is a need to present a list of choices to a user, then -Outputmode comes in handy.

Hope this is making more sense. Thanks.

cadayton avatar Aug 16 '19 11:08 cadayton

$a = Get-ChildItem c:\users | select name, length | Out-GridView -OutputMode Single Desn't work: no OK(Export) Cancel buttons (PSVersion: 7.0.0-preview.2).

golovini avatar Aug 16 '19 14:08 golovini

Ah I see!

Yep this is not supported yet but as a workaround you can achieve similar behavior with -PassThru

TylerLeonhardt avatar Aug 16 '19 14:08 TylerLeonhardt

fyi -passthru is equivalent to -outputmode multiple in this (and legacy) cmdlet and is not the same as the legacy out-gridview's -outputmode single mode.

LBegnaud avatar Nov 05 '19 17:11 LBegnaud

reopening as this is about GraphicalTools

TylerLeonhardt avatar Sep 27 '20 17:09 TylerLeonhardt

@andschwa This should be closed as won't fix since it's for the Avalona version.

tig avatar Aug 24 '22 12:08 tig