custom event in a dialog

hi all,

I have a GUI that displays a list of choices to the user, with radio button. As soon as one of those radio button is checked, I would like to enable a button so that the script will set the choice that the user as made.

Is there a way to create a custom event that would enable that button when a radio button is checked?

thanks!

Custom events are not required, you just need to create an even handler. Radio buttons have several events such as _Click or _CheckedChanged:

https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.radiobutton?view=net-5.0

There are many examples of .NET forms or WPF in Powershell for radio buttons. Most of the time _Click is used.

https://social.technet.microsoft.com/Forums/windows/en-US/ad23f685-6528-40a1-b431-a9948fd8100c/forms-in-powershell-enable-button-based-on-radio-button-click