Solved

Radiobutton question

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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