How to show controls dynamically


I have created a form which contains in top two radiobuttons. Under these radiobuttons I have a groupbox.
I need to do so that for each selected radiobutton the controls within a groupbox will be different.
Please, see attached ilustration.

how to do this and what's the correct way of creating such content sensitive controls?

Who is Participating?
Kyle AbrahamsConnect With a Mentor Senior .Net DeveloperCommented:
You can also have multiple panels over each other . . . so create 2 different panels (one for each radio button), then set that specific panel visible to true and the other false.

If you're going to be having a lot of these you can look at dynamically adding controls.
Kyle AbrahamsSenior .Net DeveloperCommented:
Create a panel (where the red line is)

On the RadioButtons Selected Index Changed, set the panel visibility to true or false.
ZaurbAuthor Commented:
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.