Solved

Checked Tradiogroup at Run time

Posted on 2001-06-15
4
192 Views
Last Modified: 2010-04-06
I have a radiogroup box which is empty at design time but becomes populated at run time. When I pupulate it the item index is always -1 which means that no buttons are checked.

I can't find a way to set the dirst radio button as checked in code. I can set the item index, but this does nothing for the checked status of the button.

Any ideas
0
Comment
Question by:mike_tipping
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
ITugay earned 100 total points
ID: 6194352
Hi mike_tipping,

to set radio button checked:
   RadioGroup1.ItemIndex := nn;
to clear checked button you should check another button

to clear all buttons set
  RadioGroup1.ItemIndex = -1;

-----
Igor.
0
 
LVL 4

Expert Comment

by:jsweby
ID: 6194592
Hi,

You might find that you are better off using a GroupBox and indiviual TRadioButtons in the GroupBox. RadioButtons in a GroupBox are mutually exclusive just as they are in a TRadioGroup, but you have the advantage of setting the Checked value of a specific radio button and having the OnClick event for the RadioButtons.

J.
0
 

Author Comment

by:mike_tipping
ID: 6194624
Well that was an easy 100 points... I was being stupid and setting the valuse at the wrong point.

Cheers

Mike T
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6194727
Hi mike_tipping,

really easy :-)

thanx
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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