Solved

Checked Tradiogroup at Run time

Posted on 2001-06-15
4
190 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

12 Experts available now in Live!

Get 1:1 Help Now