Solved

Radiobutton question

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 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

20 Experts available now in Live!

Get 1:1 Help Now