• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Getting String values from RadioGroups

How do you get the actual 'string' value from a RadioGroup?  For instance, the group has 2 options - Yes and No.  How do I retrive the text 'Yes' or 'No' instead of trying to convert the itemindex number?
0
d4jaj1
Asked:
d4jaj1
1 Solution
 
pivarCommented:
Use ItemIndex and Items.

That is:
   text := RadioGroup1.Items[RadioGroup1.ItemIndex];

ItemIndex is -1 if you haven't selected any option, so you have to make a check for this.

/pivar
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now