Solved

Radiobutton question

Posted on 2007-04-01
1
271 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
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

Technology Partners: 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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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