How do I set a default value to an item in a TradioGroup control ?

Who is Participating?
mikelittlewoodConnect With a Mentor Commented:
If you want to do it in code on the OnShow of the form you can do

RadioGroup1.ItemIndex := 0;

If you want to set the default value to a specific string but you dont know its index you can use:

RadioGroup1.ItemIndex := RadioGroup1.Items.IndexOf('YourItem')
?? just set the itemindex-property to the radio which should selected (itemindex is zerobased)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.