如题 感谢大家了 

解决方案 »

  1.   

    var
    i:integer;
    begin
    for i:=self.ComponentCount-1 downto 0 do
    begin
      if self.Components[i] is TRadioButton then
      TRadioButton(self.Components[i]).Checked:=False;
    end;
    end;
      

  2.   

    var 
      i: integer;
    begin
      for i:=0 to self.ControlCount-1 do
      begin
         if Controls[i] is TRadioButton then
            (Controls[i] as TRadioButton).Checked:= false;
      end;
    end;
      

  3.   

    var  
      i: integer; 
    begin 
      for i:=0 to self.ControlCount-1 do 
      begin 
         if Controls[i] is TRadioButton then 
            (Controls[i] as TRadioButton).Checked:= false; 
      end; 
    end;
      

  4.   

    to:jhldelphi 我按照你的方法做了 
    怎么界面上选中的RadioButton还是没有变化呢? 我的那些RadioButton是放在GroupBox里面的
      

  5.   

    RadioButton是放在GroupBox里面的 我遍历获取不到啊  希望大家继续给点意见啊 
      

  6.   

    用hsmserver  的方法肯定行的,没有反映就加上 UPDATE。
      

  7.   

    谢谢大家了 我解决问题了 遍历的过程中涉及到了嵌套遍历,这是我之前没注意的。var
      i,j,k: Integer;
    begin
     for i:=0 to self.ControlCount-1 do
      begin 
         if Controls[i] is TGroupBox then
           begin
             for j:=0 to (Controls[i] as TGroupBox).ControlCount-1 do
              begin
                 if (Controls[i] as TGroupBox).Controls[j] is TRadioButton then
                   begin
                    (((Controls[i] as TGroupBox).Controls[j]) as TRadioButton).Checked:=false;
                    // listbox1.Items.Add((Controls[i] as TGroupBox).Controls[j].Name);
                   end;
              end;
            end;
      end;
    end;
      

  8.   

    那你就这样写
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: integer;
      j: integer;
    begin
      for i:=0 to GroupBox1.ControlCount-1 do
      begin
          if GroupBox1.Controls[i] is TRadioButton then
            (GroupBox1.Controls[i] as TRadioButton).Checked:= false;
      end;
    end;