From Xojo Documentation

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

WebRadioGroup.ValueChanged(button As WebRadioButton)

New in 2020r1

Supported for all project types and targets.

The selected radio button has been changed.


Use the SelectedRowIndex property to determine which radio button was pressed..

Sample Code

This code in the ValueChanged event of a default WebRadioGroup tells you which radio button was pressed by position/index:

Select Case Me.SelectedRowIndex
Case 0
MessageBox("You clicked the top button.")
Case 1
MessageBox("You clicked the bottom button.")
End Select

You can also use the SelectedItem method to determine the selected radio button based on its caption:

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

See Also

WebRadioGroup.SelectedRowIndex property, WebRadioGroup.SelectedItem method, WebRadioButton class.