A: How to disable a radio button in tDBRadioGroup

        Someone asked for this a while ago, hope he sees it:

{Changes the radiobutton in the GroupBox tDBRadioGroup with the caption of
 sCaption to bEnable.

 Usage Disable:
 changeRadio(WhateverGroupBoxName, 'Disable This', false);

 Usage Enable:
 changeRadio(WhateverGroupBoxName, 'Disable This', true);

Quote
}

function TForm1.ChangeRadio(GroupBox: tdbradioGroup; sCaption: string; bEnable: boolean): boolean;
var
iloopcount: integer;
begin

  {Iterate through the GroupBox's internal control array which contains
   the radio buttons}
  for iloopcount:=0 to GroupBox.controlcount-1 do
  begin

    {Check for the desired caption and enable or disable}
    if tradiobutton(GroupBox.controls[iLoopCount]).caption=sCaption then
    begin
     if bEnable then
     begin
       tradiobutton(GroupBox.controls[iLoopCount]).enabled:=true;
     end
     else
     begin
       tradiobutton(GroupBox.controls[iLoopCount]).enabled:=false;
     end;
    end;
  end;
end;

---

--
Delphi and Paradox Consultant. Member: Borland Delphi Technical Support
            Web Page being relocated- want to provide space?

Borland supplied disclaimer: The services I provide via this message
and all consulting services I may provide are in no way associated with
or sponsored by Borland International or any of its subsidiaries.