TLabel(FindComponent('Label'+IntToStr(ii))).Caption

解决方案 »

  1.   

      if Panel3.Width>265 then
      begin
        iWidth:=Panel13.Width-107-8-10;
        for i := 0 to self.ComponentCount-1 do
        begin
          Component := self.Components[i] as TComponent;
          if Component.ClassNameIs('TDBEdit') then
             (Component as TDBEdit).Width := iWidth;
          if Component.ClassNameIs('TDBMemo') then
             (Component as TDBMemo).Width := iWidth;
        end;
      end;
    这是某个控件的集体赋值,单个的赋值与此类似,可以查查资料