Solved

Getting String values from RadioGroups

Posted on 1997-09-16
1
136 Views
Last Modified: 2010-04-04
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
Comment
Question by:d4jaj1
1 Comment
 
LVL 22

Accepted Solution

by:
pivar earned 20 total points
ID: 1345104
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now