How to show controls dynamically

Hello!

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?

1.png
LVL 1
ZaurbAsked:
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.

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/dee96cac-a1c5-4304-827f-2f5ce122a5ab/
0
 
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.
0
 
ZaurbAuthor Commented:
Thank you!
0
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.