for i:=0 to DBGgrid1.Columns.Count do
begin
for j:=0 to ComponentCount-1 do
begin
if (Components[j] is TLabel) then
if (Components[j] as TLabel).Tag=i then
begin
DBGrid1.Columns[i].Title.Caption:=(Components[j] as TLabel).Caption;
Break;
end;
end;
end;把Label的Tag属性编号(0,1,2.....)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货