Solved

TRadiobutton and Groupbox

Posted on 1998-09-17
3
573 Views
Last Modified: 2008-03-10
Hi,
under D3 (and WIN98) i create at runtime (!) four different groupboxes (not overlapping) and in each groupbox there are three radiobuttons.
Everytime i click at one radiobutton, it will be checked, but all (!) other radiobuttons turn to "not checked", not only those of the same group.
what is my mistake ??
how can i tell a radiobutton to which group he does belong ?

when i did the same in the D3-Designer, it works correct.

hope for help !
titz
0
Comment
Question by:titz
3 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1340063
titz,

are you using only the component TRadioGroup or are you grouping TRadioButtons together by yourself?
In both cases make sure that you set the parent property to the right value (probably the form or a panel).
In the second case put all radioButtons that belong to one group on one group panel. So for 4 different groupBoxes you'll have to create 4 panels.
In the first case make sure, you set the "name" property to a senseful setting. If it still doesn't work there's a little trick to find out what you've to do. Create in the designer exactly the situation you want to have. Then right click on the form and select "view as text" (I don't know if that's the name of the menu item I mean; I've the german version). Now look what properties the designer has set and do the same during runtime.
If you still have problems, please post some sources.

Hope this helps... Madshi.
0
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1340064
When you create the radio buttons you need to set the parent.....Here is how....

If you create controls at design time...

YOu need to select the groupbox, and then drop the radio buttons on the groupbox....

if you create the controls at runtime here is how to set the parents.....

var
  i: integer;
  RBtn : TRadioButton;
begin
  for i := 0 to 2 do
  begin
    RBtn := TRadioButton.Create(self);
    RBtn.Parent := MyGroupBox1;
    //Other properties and events
  end;
end;

Regards,
Viktor Ivanov
0
 
LVL 1

Author Comment

by:titz
ID: 1340065
thanks victor!
regards titz
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 302
Delphi 2010 Export to pdf 2 330
Delphi selector screen 2 78
How to open a new windows chrome resized and disabled the toolbar? 3 110
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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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 …

816 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

11 Experts available now in Live!

Get 1:1 Help Now