Get-Input in GridView

Jun 27, 2014 at 8:55 PM
Hi guys,

is it possible to use the great Get-Input inside a gridview? When I use Get-Input it is alway in its own windows.

Thanks
Coordinator
Jul 2, 2014 at 4:07 AM
Edited Jul 2, 2014 at 4:08 AM
Sure it is -- that's why Get-Input has a -HideOKCancel switch
New-StackPanel {
   New-Grid -Name InputWrapper {
      $Url = "https://farm4.staticflickr.com/3874/14386012335_8e52de88b2_q_d.jpg"
      New-Image -Source $Url -MaxHeight 250
      Get-Input @{ 
         Name = "Full Name";
         Team = "Country";
         LastGame = [DateTime]
      } -HideOk
   }
   New-StackPanel -Orientation Horizontal -HorizontalAlignment Right -Margin "0,2,6,4" {
      New-Button { "Cancel" } -Name CancelButton -IsCancel -Padding "16,4,16,4" -Margin "2,0,0,0" -On_Click {
         Close-Control $Window
      }

      New-Button { "_OK" } -Column 1 -Name OKButton -IsDefault -Padding "16,4,16,4" -Margin "2,0,0,0" -On_Click {
         Set-UIValue $Window $(Get-ChildControl "InputWrapper" | Get-ChildControl | Get-UIValue)
         Close-Control $Window
      }
   }
} -Show