Advertisement

06.02.2008 at 08:00AM PDT, ID: 23450064
[x]
Attachment Details

Radio Button Group onClick Event

Asked by IT79637 in Delphi Programming, Delphi Components

Tags: Borland, CodeGear, Delphi 7

I added a RadioGroup, name=rbGroup1, to a form.   I used the Items property to add 4 buttons to the group. and the ItemIndex property to set the default.  I am also able to enable or disable the radio buttons.

Question: How do I test when the one of the radio buttons is clicked?

Sample code of enabling the buttons is below.

Please provide one code sample.  Thank you!!!

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
if ImageForm.IM1.ImageColors = 2 then  begin
   rbGroup1.Controls[0].Enabled := true;
   rbGroup1.Controls[1].Enabled := true;
   rbGroup1.Controls[2].Enabled := true;
   rbGroup1.Controls[3].Enabled := true;
 end   else   begin
   rbGroup1.Controls[0].Enabled := false;
   rbGroup1.Controls[1].Enabled := false;
   rbGroup1.Controls[2].Enabled := false;
   rbGroup1.Controls[3].Enabled := false;
 end;
[+][-]06.02.2008 at 08:58AM PDT, ID: 21693145

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.02.2008 at 10:54PM PDT, ID: 21697851

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Delphi Programming, Delphi Components
Tags: Borland, CodeGear, Delphi 7
Sign Up Now!
Solution Provided By: Geert_Gruwez
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628