From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!


New in 2010r4

Supported for all project types and targets.

The selected radio button has been changed.


Use the SelectedCell method to determine which radio button was clicked. SelectedCell returns a Pair with the Left property containing the row index and the Right property containing the column (both are zero-based).


This code in a default WebRadioGroup tells you which radio button was clicked:

Var p As Pair

p = Me.SelectedCell
Select Case p.Left
Case 0
MessageBox("You clicked the top button.")
Case 1
MessageBox("You clicked the bottom button.")
End Select

You can also use SelectedCaption to check for a selected radio button based on its caption:

Select Case Me.SelectedCaption
Case "First"
MessageBox("First button")
Case "Second"
MessageBox("Second button")
End Select

See Also

SelectedCell, SelectedCaption, SelectedTag