Android Question Radio Button Groups

Derek Jee

Active Member
Licensed User
Longtime User
Hi there

I have some radio buttons in a panel which allows only one to be selected. They have all been added in code and not the designer. Is there a way to get the value of selected one without having to interrogate the radio buttons individually? I am sure I've missed something and hope someone can tell me what it is..

Thank you :)


Derek
 

klaus

Expert
Licensed User
Longtime User
As you have added the RadioButtons in the code you should set the Tag property to an index and set the EventName the same for all RadioButtons.
Then in the RadioButtons.CheckedChange event you should use Sender to get the the RadioButton that raised the event and with Tag property you know which one raised.
 
Upvote 0
Top