Link to home
Start Free TrialLog in
Avatar of dealclickcouk
dealclickcouk

asked on

How to check when a control changes that it is created at runtime


Hi,

I have the code below which creates a number of radio buttons on the form at runtime, at default none are selected.  I want a procedure that will activate a button if any of the radio buttons are selected, how do I do this?

procedure Tform.CreateRadio(aCaption : String; aValue : Boolean);
var r : TRadioButton;
begin
  r := TRadioButton.Create(self);
  if FRadioList.Count = 0 then
    begin
    r.Top := 28;
    r.width := 15;
    end
  else
    begin
    r.Top := TRadioButton(FRadioList[FRadioList.Count-1]).top + 25;
    r.width := 300;
    end;
  r.left := 8;
  r.parent := self;
  r.caption := aCaption;
  r.checked := aValue;
  FRadioList.Add(r);
end;
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial