How to show controls dynamically

Posted on 2011-10-13
Medium Priority
Last Modified: 2013-12-16

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?

Question by:Zaurb
  • 2
LVL 41

Expert Comment

by:Kyle Abrahams
ID: 36965031
Create a panel (where the red line is)

On the RadioButtons Selected Index Changed, set the panel visibility to true or false.
LVL 41

Accepted Solution

Kyle Abrahams earned 1000 total points
ID: 36965044
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.


Author Closing Comment

ID: 36973637
Thank you!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 6 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question