This returns a List of ALL RadioButtons that are a descendant of the Pane passed as a parameter. If you have Pane2 as a child of Pane1 and Pane2 also has RadioButtons, then the returned List will have Pane2's RadioButtons as well. You can store info in a RadioButton's Tag about its parent Pane and modify the sub to differentiate on that basis if you want.
B4X:
Sub DescendantRadioButtons(Pain As Pane) As List
Dim res As List
res.Initialize
For Each n As Node In Pain.GetAllViewsRecursive
If n Is RadioButton Then res.Add(n)
Next
Return res
End Sub
Thank you.
My code:
Dim rb As RadioButton
For Each n As Node In paneHist
If n Is RadioButton Then
rb=n
If (rb.Tag) = His Then
rb.Selected=True
Else
rb.selected=False
End If
End If
Next