本帖最后由 jianye112 于 2014-06-29 21:51:33 编辑

解决方案 »

  1.   

    if Form2.Components[j].classname='TComboBox'  then
    呢?是不是真的不同了?或者 Tcustomcombobx ?
      

  2.   


    真的是 TCustomComboBox  为什么呢,属性看到是 TComboBox
      

  3.   

    classname = 'TComboBox' //这也对
      

  4.   

    classname = 'TComboBox' //这也对,怎么是 TCustomComboBox   呢
      

  5.   

    XE6下测试通过
    procedure TForm17.Button1Click(Sender: TObject);
    var
      j: Integer;
    begin
      for j := 0 to self.ComponentCount - 1 do
      begin
        if self.Components[j] is TComboBox then
          showmessage((self.Components[j] as TComboBox).Text);
      end;end;