呵呵,你调用错用,用Controls[i],而不是Components[i]。
Controls对应于ControlCount,而Components对应于ComponentCount

解决方案 »

  1.   

    少了begin/end;
    for i:=0 to pagecontrol1.ActivePage.ControlCount-1 do
    ///
    begin
    ////
    t:=pagecontrol1.ActivePage.Components [i];
    if (t is 想要的控件) then
    //dosomething;
    ///end;
      

  2.   

    Chechy兄 果然强人也
    不过 Controls 与Components有什么不同呢
    我看帮助文件中也是说Components是tabsheet的child啊
      

  3.   

    能不能用components就看控件的owner是什么
    虽然控件的parent是tabsheet,但是owner还是form啊
    呵呵
      

  4.   

    不是,Components是相对于Owner概念的,所以一般只有Form下的Components才有东西,其他的都应该没有。
    而Controls是相对于Parent概念的,所以只要该控件上面放了控件,那么就有Controls。