How to get RadioGroup if SelectedIndex = true

I am confused by choice of words in RadioGroup. Apparently DeskTop and Web are basically the same. There is ItemAt which might be usefjul
What is the code to get whether the index is selected and is true or false?

I have part of the code which doesn’t give true / false here:

If me.SelectedIndex = 0 Then
ElseIf me.SelectedIndex = 1 Then

I don’t understand. If the item is the SelectedIndex, then it is by definition True and all the others are False.

For a RadioGroup the SelectedIndex is the index of the RadioButton within the set that has been clicked. So if you have the first item selected SelectedIndex would be 0, the second 1 etc.

It is possible for SelectedIndex to be -1, if none of the RadioButtons are selected. Obviously, if you have more than two options it could also be 2 or more.

Thank you all. I wasn’t sure with the different terminology, AND not having an example. SelectedIndex is only used in RadioGroup.

How does one refer to the individual member. Like in the window’s closing event for RGRadioGroup:

If RGRadioGroup(0) = true Then
App.XD = True
End If

I assume “ItemAt” is used for Introspection - Correct?

Returns the [DesktopRadioButton] at the index passed.

You still use SelectedIndex.

If RGRadioGroup.SelectedIndex = 0 Then
   App.XD = True
End If

You can use ItemAt if you need more information than whether it is selected or not. I don’t think ItemAt has anything to do with introspection.

You could use ItemAt in the same situation, but it’s more cumbersome in my opintion.

If RGRadioGroup.ItemAt(0).Value = True Then
   App.XD = True
End If