C#, Windows forms, basic form and a menu.
I want to display different sets of controls based on the menu choice (so I
want to have different pages of questions based on a user selected menu
choice -- so if I choose A I want to show a label and three textboxes but if
I choose B I want to show a different label and five textboxes).

Like having tabs but instead of a tab I have my menu choice change the
form's appearance and the controls it uses.

I could just do x.Show and x.Hide for all the controls but is there a better
way to do it?

Also there will be a button and some other labels that I would like in
common no matter what menu is selected.

Thanks for any ideas.

Re: Best Way to have different views base don menu selection? by hirf-spam-me-here

hirf-spam-me-here
Sat Oct 11 18:52:49 CDT 2003

* "mBird" <no@spam.com> scripsit:
> C#, Windows forms, basic form and a menu.
> I want to display different sets of controls based on the menu choice (so I
> want to have different pages of questions based on a user selected menu
> choice -- so if I choose A I want to show a label and three textboxes but if
> I choose B I want to show a different label and five textboxes).
>
> Like having tabs but instead of a tab I have my menu choice change the
> form's appearance and the controls it uses.
>
> I could just do x.Show and x.Hide for all the controls but is there a better
> way to do it?
>
> Also there will be a button and some other labels that I would like in
> common no matter what menu is selected.

You can design different usercontrols which contain the views of the
form. Then you can place these usercontrols on the form and show/hide
or add/remove them.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Re: Best Way to have different views base