Delphi 7, Randomize RadioGroup

Can I use Randomize which is the builtin function for delphi, on a radiogroup if it is possible?
Who is Participating?
Geert GConnect With a Mentor Oracle dbaCommented:
yes, use it on the itemindex

radiogroup.itemindex := Random(radiogroup.items.count);
HypoConnect With a Mentor Commented:
If you want to just select a random item in a radio group then It's quite simple...

RadioGroup1.ItemIndex := Random(RadioGroup1.Items.Count);

Open in new window

JacquesBaardAuthor Commented:
Thanks. :)
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.