鲜
鲜橙
Unregistered / Unconfirmed
GUEST, unregistred user!
我执行下面的过程后,delphi提示list out of bounds(2),这是出了什么问题?怎样解决。
procedure Ttestform.Createcolumns1;
begin
with dbgridsin do
begin
columns[0].fieldname:='TEST';
columns[1].fieldname:='A';
columns[2].fieldname:='B';
columns[3].fieldname:='C';
columns[4].fieldname:='D';
columns[5].fieldname:='ANS';
end;
with dbgridmul do
begin
columns[0].FieldName:='TEST';
columns[1].fieldname:='A';
columns[2].fieldname:='B';
columns[3].fieldname:='C';
columns[4].fieldname:='D';
columns[5].fieldname:='E';
columns[6].fieldname:='ANS';
end;
with dbgridsiq do
begin
columns[0].fieldname:='TEST';
columns[1].fieldname:='ANS';
end;
end;
procedure Ttestform.Createcolumns1;
begin
with dbgridsin do
begin
columns[0].fieldname:='TEST';
columns[1].fieldname:='A';
columns[2].fieldname:='B';
columns[3].fieldname:='C';
columns[4].fieldname:='D';
columns[5].fieldname:='ANS';
end;
with dbgridmul do
begin
columns[0].FieldName:='TEST';
columns[1].fieldname:='A';
columns[2].fieldname:='B';
columns[3].fieldname:='C';
columns[4].fieldname:='D';
columns[5].fieldname:='E';
columns[6].fieldname:='ANS';
end;
with dbgridsiq do
begin
columns[0].fieldname:='TEST';
columns[1].fieldname:='ANS';
end;
end;