PowerShell-Script-Menu-Gui icon indicating copy to clipboard operation
PowerShell-Script-Menu-Gui copied to clipboard

Additional functionality

Open M3ssor3m opened this issue 3 years ago • 2 comments

Hi,

Firstly, great work!

Is it possible to add more functionality to the GUI?

  1. Fullscreen Mode
  2. Grid layout

Thanks

M3ssor3m avatar May 01 '22 23:05 M3ssor3m

Yes I'm also curious how we could go about adding a 2nd, 3rd, etc. column to the Menu.

pa-0 avatar Jul 03 '24 22:07 pa-0

I'd like to have several column too... so I went to read code. I see in PSScriptMenuGui/private/functions.ps1

Function New-GuiHeading {
    param(
        [Parameter(Mandatory)][string]$name
    )
    $string = Get-Content "$moduleRoot\xaml\heading.xaml"
    $string = $string.Replace('INSERT_SECTION_HEADING',(Get-XamlSafeString $name) )
    $string = $string.Replace('INSERT_ROW',$row)
    $script:**row++**

    return $string
}

I think we could add a IF in add counter on last line, to verify if reached the max_line (new parameter each one set, may be default to 10 or 15 ) and then add a new column.

The new column appear to be changed here: /PSScriptMenuGui/xaml//item.xaml

<Button x:Name="INSERT_BUTTON_NAME" Grid.Row="INSERT_ROW" **Grid.Column="0"** Background="INSERT_BACKGROUND_COLOR" Foreground="INSERT_FOREGROUND_COLOR" MinHeight="50" VerticalAlignment="Top" Padding="10" Margin="0,5,0,5" >
                <TextBlock TextWrapping="Wrap" TextAlignment="Center">INSERT_BUTTON_TEXT</TextBlock>
            </Button>
            <TextBlock TextWrapping="Wrap" Grid.Row="INSERT_ROW" **Grid.Column="1**" Padding="10,5,0,5" VerticalAlignment="Center">INSERT_DESCRIPTION</TextBlock>

Just do not know how to do it... to create a new pair of columns (2 and 3 and so on)

Anyone understang PS better than me should try (even the owner of project)... and please let me know!!!

Regards,

It´s nice to have a wonderful GUI menu easy to build. But I wish more columns because monitors are SO WIDE today! :D

jader31 avatar Dec 23 '24 17:12 jader31