Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Checked Tradiogroup at Run time

Posted on 2001-06-15
4
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
ITugay earned 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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