Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27472

VS 2010 I'd appreciate some assistance with checking the contents of Group Boxes.

$
0
0
I'm attempting to check if any radio buttons in a group box have been checked or not, and I'm running into issues trying to define that situation. Also, I don't understand Case Statements.
Code:

Dim rdBttnSizes As RadioButton = CType(GroupBoxSize.Controls.OfType(Of RadioButton)(), RadioButton)
Dim rdBttnColors As RadioButton = CType(GroupBoxSize.Controls.OfType(Of RadioButton)(), RadioButton)

        Select Case (rdBttnSizes == True And rdBttnColors == True)
            Case False And False

            Case False And True

            Case True And False

            Case True And True

        End Select

I'm trying to check if any of the radio buttons has been selected in those two group boxes, and then depending on which group box has or hasn't been selected give one of 4 outputs. I'm trying to get each group box into a boolean value that chances depending on if the radio buttons.

If I'm not clear enough, ask and I'll gladly elaborate.

Viewing all articles
Browse latest Browse all 27472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>