Different button action on second click

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Posts: 1
Joined: Tue Jun 04, 2019 4:58 pm

Different button action on second click

Post by sergioCpE »

I am creating a GUI script that walks the user thru several subsequent steps, each step is a button. I have a "next" button to let the user go from button to button in the right order, but my challenge is how to I tell the button to do a different event on a second, third or four click?

Posts: 14668
Joined: Tue May 22, 2007 9:57 am
Answers: 5
Has voted: 1 time
Been upvoted: 5 times

Re: Different button action on second click

Post by jvierra »

What you are asking is not clear. If you have buttons the why a "next" button? Just let the user click the buttons in order.

You can also use the template that does all of this for you. It is called the "Wizard Style" form template.
2020-04-26.png (51.56 KiB) Viewed 360 times