Radio Buttons as GroupBox headers

Posted on 2009-02-11
Last Modified: 2013-11-26

I'm a beginner in using VS2008 and and am trying out a few things. One of the things I'm try to do is have a radio button as the caption of the group box.

As an example.. say I have two GroupBox's on a form, each containing various textboxes, I want a radio button as the header of each Groupbox and the user will only be able to select one or the other 'dot' and not both. Currently, I can select both radio buttons at the same time and this is not what I want.

Ultimately, I want to use the radio button to control whether the contents of the GroupBox's are active or not. Say the user select the first radio button, this will allow the user to enter data into the textboxes within the 1st GroupBox but the textboxes in the other group will be greyed out. If the user selects the 2nd radio button then the items in the 2nd groupbox become active and the contents of the first groupbox become greyed out.

How can I achive this or am I going about this the wrong way?

Thanks for your help.

Question by:shorak
    LVL 52

    Accepted Solution

    The trick is to add the radio buttons to the form rather than the groupbox itself. You will need to use set the location of the radio button using the properties panel because if you simply drag the control VS will usually add it to the groupbox
    LVL 11

    Author Closing Comment

    thanks for your help..

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now