Reputation: 279
I like to create GUI like wizard for my program. I don't know how to explain. But the user just click "next" for next process and end with "Done" button at the last process. How do i can create this on in Windows Form C#?
eg:
Upvotes: 1
Views: 1461
Reputation: 16277
For each of your wizard page, you can create a user control, for instance page1, page2, etc. you can then add them into a collection:
List<Page> allPages= new List<Page>();
foreach( var page in allPages)
page.hide();
And when you click "Next", you increment the counter:
void onNextClicked(...)
{
current++;
allPages[current].Show();
}
That is it. Of course, the above is the pseudo code. Cheers!
Upvotes: 1
Reputation: 9244
You just stack a bunch of panels on top of each other and place the content of each step in separate panels. Then, as the users clicks Next or Prev, you show/hide the different steps by setting the .Visible property of the panels accordingly.
Upvotes: 3