Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by Pet_Ant on Thursday November 28, 2024 @03:09PM
(#42268228)
Really? Would love to see a binding for Powershell. Just for cross-platform shell scripts to be able to disable a pop-up for input etc. Just makes them more accessible.
[ Parent
| on HN ]
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by shakna on Thursday November 28, 2024 @10:01PM
(#42270422)
That would be WPF. It uses Tk under the covers.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by shakna on Friday November 29, 2024 @12:08AM
(#42271002)
Ah, my bad. It is inspired by Tk. Should still be usable across most things today.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by Pet_Ant on Friday November 29, 2024 @10:46AM
(#42274619)
I believe that has been removed in later versions as the old examples I find online don't work in Powershell
> InvalidOperation: Unable to find type System.Windows.Forms.MessageBoxButtons].
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by shakna on Sunday December 01, 2024 @07:13AM
(#42288025)
This still works today for me:
Add-Type -AssemblyName PresentationFramework
[XML]$form = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</Window>
"@
$NR = (New-Object System.Xml.XmlNodeReader $form)
$window = [Windows.Markup.XamlReader]::Load($NR)
$window.ShowDialog()