?
Solved

Radiobutton question

Posted on 2007-04-01
1
Medium Priority
?
279 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 1500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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