Solved

Radiobutton question

Posted on 2007-04-01
1
276 Views
Last Modified: 2010-04-23
Hello

I want to do the following:

2 Groupboxes, in each of them a radiobox. If I select the one, the other should be de-selected

On Groupbox1 I want to have 2 other radiobuttons, which should switch by itself, so it should not change the radiobuttons above

Is it possible?

Thanks

Sven
0
Comment
Question by:Ruttensoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
r1937 earned 500 total points
ID: 18831705
As I can understand, you have:
Two group boxes - GroupBox1 and GroupBox2
In GroupBox1 - RadioButton1, RadioButton2 and RadioButton3
In GroupBox2 - RadioButton4

You want "RadioButton1 & RadioButton2" to switch and "RadioButton3 & RadioButton4" to switch independently.

This is how I would do it:

Add a "Panel" in GroupBox1 - Panel1
Move RadioButton3 to Panel1.

Panels are invisible at runtime and will isolate other radio buttons. Make sure RadioButton3 is in Panel1 ; if you move Panel1, RadioButton3 should move along with it.

Add code for the independent radio buttons to switch:

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        If RadioButton3.Checked Then
            RadioButton4.Checked = False
        End If
    End Sub

    Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
        If RadioButton4.Checked Then
            RadioButton3.Checked = False
        End If
    End Sub
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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